Documentation ¶
Index ¶
- func GetAlertCountByAddress(address string, httpClient *http.Client) (int, error)
- func GetTopologyUnderEtcd(ctx context.Context, etcdClient *clientv3.Client) (tidbNodes []TiDBInfo, grafanaNode *GrafanaInfo, ...)
- type AlertManagerInfo
- type ComponentStatus
- type GrafanaInfo
- type PDInfo
- type TiDBInfo
- type TiKVInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAlertCountByAddress ¶
GetAlertCountByAddress receives alert manager's address like "ip:port", and it returns the
alert number of the alert manager.
func GetTopologyUnderEtcd ¶
func GetTopologyUnderEtcd(ctx context.Context, etcdClient *clientv3.Client) (tidbNodes []TiDBInfo, grafanaNode *GrafanaInfo, alertManagerNode *AlertManagerInfo, e error)
GetTopology return error only when fetch etcd failed.
Types ¶
type AlertManagerInfo ¶
type ComponentStatus ¶
type ComponentStatus uint
const ( ComponentStatusUnreachable ComponentStatus = 0 ComponentStatusUp ComponentStatus = 1 ComponentStatusTombstone ComponentStatus = 2 )
type GrafanaInfo ¶
type PDInfo ¶
type PDInfo struct { Version string `json:"version"` IP string `json:"ip"` Port uint `json:"port"` DeployPath string `json:"deploy_path"` Status ComponentStatus `json:"status"` }
type TiDBInfo ¶
Click to show internal directories.
Click to hide internal directories.