gh

package
v0.0.0-...-8bdf0cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2020 License: MIT, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	Hostname   string `json:"hostname"`
	Site       string `json:"site"`
	Attributes struct {
		MySQLCluster string `json:"github:mysql_cluster"`
		MySQLRole    string `json:"github:mysql_role"`
		MySQLShard   string `json:"github:mysql_shard"`
	} `json:"attributes"`
}

type MySQLCluster

type MySQLCluster struct {
	Name                   string `db:"cluster_name" yaml:"cluster_name" json:"cluster_name" `
	AlternateName          string `db:"alternate_name" yaml:"alternate_name" json:"alternate_name" `
	RWName                 string `db:"rw_name" yaml:"rw_name" json:"rw_name" `
	ROName                 string `db:"ro_name" yaml:"ro_name" json:"ro_name" `
	AnalyticsName          string `db:"analytics_name" yaml:"analytics_name" json:"analytics_name" `
	GLBPoolName            string `db:"glb_pool_name" yaml:"glb_pool_name" json:"glb_pool_name" `
	State                  string `db:"state" yaml:"state" json:"state" `
	DBConsoleName          string // evaluated from other fields
	DBConsoleDefaultSchema string `db:"dbconsole_default_schema" yaml:"dbconsole_default_schema" json:"dbconsole_default_schema" `
	Port                   int    `db:"port" yaml:"port" json:"port" `
	IsVitess               bool   `db:"vitess" yaml:"vitess" json:"vitess" `

	TimeUpdated time.Time `db:"time_updated" json:"time_updated" `
}

type MySQLDiscoveryAPI

type MySQLDiscoveryAPI struct {
	// contains filtered or unexported fields
}

func NewMySQLDiscoveryAPI

func NewMySQLDiscoveryAPI(c *config.Config) (*MySQLDiscoveryAPI, error)

func (*MySQLDiscoveryAPI) GetCluster

func (api *MySQLDiscoveryAPI) GetCluster(clusterName string) (cluster *MySQLCluster, err error)

type SitesAPI

type SitesAPI struct {
	// contains filtered or unexported fields
}

func NewSitesAPI

func NewSitesAPI(c *config.Config) (*SitesAPI, error)

func (*SitesAPI) GetInstance

func (api *SitesAPI) GetInstance(hostname string) (instance *Instance, err error)

func (*SitesAPI) MySQLClusterShards

func (api *SitesAPI) MySQLClusterShards(mysqlCluster string) (shards []string, err error)

MySQLClusterShards returns a list of shard names for the given cluster. If the cluster is not sharded, the result is []string{""}

func (*SitesAPI) ValidateMySQLCluster

func (api *SitesAPI) ValidateMySQLCluster(mysqlCluster string) (instances []Instance, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL