Documentation ¶
Index ¶
- Variables
- func FetchNgMonitoringTopology(ctx context.Context, etcdClient *clientv3.Client) (string, error)
- func FetchStoreTopology(pdClient *pd.Client) ([]StoreInfo, []StoreInfo, error)
- type AlertManagerInfo
- type ComponentStatus
- type GrafanaInfo
- type PDInfo
- type PrometheusInfo
- type SchedulingInfo
- type StandardComponentInfo
- type StoreInfo
- type StoreLabels
- type StoreLocation
- type TSOInfo
- type TiCDCInfo
- type TiDBInfo
- type TiProxyInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNS = errorx.NewNamespace("error.topology") ErrEtcdRequestFailed = ErrNS.NewType("pd_etcd_request_failed") ErrInvalidTopologyData = ErrNS.NewType("invalid_topology_data") ErrInstanceNotAlive = ErrNS.NewType("instance_not_alive") )
Functions ¶
Types ¶
type AlertManagerInfo ¶
type AlertManagerInfo struct {
StandardComponentInfo
}
type ComponentStatus ¶
type ComponentStatus uint
const ( ComponentStatusUnreachable ComponentStatus = 0 ComponentStatusUp ComponentStatus = 1 ComponentStatusTombstone ComponentStatus = 2 ComponentStatusOffline ComponentStatus = 3 ComponentStatusDown ComponentStatus = 4 )
type PDInfo ¶
type PrometheusInfo ¶
type PrometheusInfo struct {
StandardComponentInfo
}
func FetchPrometheusTopology ¶
type SchedulingInfo ¶
type SchedulingInfo struct { GitHash string `json:"git_hash"` Version string `json:"version"` IP string `json:"ip"` Port uint `json:"port"` DeployPath string `json:"deploy_path"` Status ComponentStatus `json:"status"` StartTimestamp int64 `json:"start_timestamp"` }
func FetchSchedulingTopology ¶
type StandardComponentInfo ¶
type StoreInfo ¶
type StoreInfo struct { GitHash string `json:"git_hash"` Version string `json:"version"` IP string `json:"ip"` Port uint `json:"port"` DeployPath string `json:"deploy_path"` Status ComponentStatus `json:"status"` StatusPort uint `json:"status_port"` Labels map[string]string `json:"labels"` StartTimestamp int64 `json:"start_timestamp"` }
Store may be a TiKV store or TiFlash store.
type StoreLabels ¶
type StoreLocation ¶
type StoreLocation struct { LocationLabels []string `json:"location_labels"` Stores []StoreLabels `json:"stores"` }
func FetchStoreLocation ¶
func FetchStoreLocation(pdClient *pd.Client) (*StoreLocation, error)
type TSOInfo ¶
type TiCDCInfo ¶
type TiCDCInfo struct { ClusterName string `json:"cluster_name"` GitHash string `json:"git_hash"` Version string `json:"version"` IP string `json:"ip"` Port uint `json:"port"` DeployPath string `json:"deploy_path"` Status ComponentStatus `json:"status"` StatusPort uint `json:"status_port"` StartTimestamp int64 `json:"start_timestamp"` }
type TiDBInfo ¶
type TiProxyInfo ¶
type TiProxyInfo struct { GitHash string `json:"git_hash"` Version string `json:"version"` IP string `json:"ip"` Port uint `json:"port"` DeployPath string `json:"deploy_path"` Status ComponentStatus `json:"status"` StatusPort uint `json:"status_port"` StartTimestamp int64 `json:"start_timestamp"` }
func FetchTiProxyTopology ¶
Click to show internal directories.
Click to hide internal directories.