Documentation ¶
Index ¶
- Variables
- func GetAlertManagerInstance(ctx context.Context, etcdClient *clientv3.Client) (*topo.AlertManagerInfo, error)
- func GetGrafanaInstance(ctx context.Context, etcdClient *clientv3.Client) (*topo.GrafanaInfo, error)
- func GetPDInstances(ctx context.Context, pdAPI *pdclient.APIClient) ([]topo.PDInfo, error)
- func GetPrometheusInstance(ctx context.Context, etcdClient *clientv3.Client) (*topo.PrometheusInfo, error)
- func GetStoreInstances(ctx context.Context, pdAPI *pdclient.APIClient) ([]topo.TiKVStoreInfo, []topo.TiFlashStoreInfo, error)
- func GetTiDBInstances(ctx context.Context, etcdClient *clientv3.Client) ([]topo.TiDBInfo, error)
- func NewTopologyProviderFromPD(etcdClient *clientv3.Client, pdAPI *pdclient.APIClient) topo.TopologyProvider
- type TopologyFromPD
- func (p *TopologyFromPD) GetAlertManager(ctx context.Context) (*topo.AlertManagerInfo, error)
- func (p *TopologyFromPD) GetGrafana(ctx context.Context) (*topo.GrafanaInfo, error)
- func (p *TopologyFromPD) GetPD(ctx context.Context) ([]topo.PDInfo, error)
- func (p *TopologyFromPD) GetPrometheus(ctx context.Context) (*topo.PrometheusInfo, error)
- func (p *TopologyFromPD) GetTiDB(ctx context.Context) ([]topo.TiDBInfo, error)
- func (p *TopologyFromPD) GetTiFlash(ctx context.Context) ([]topo.TiFlashStoreInfo, error)
- func (p *TopologyFromPD) GetTiKV(ctx context.Context) ([]topo.TiKVStoreInfo, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNS = errorx.NewNamespace("topo.pd") ErrEtcdRequestFailed = ErrNS.NewType("etcd_request_failed") ErrInvalidTopologyData = ErrNS.NewType("invalid_topology_data") )
Functions ¶
func GetAlertManagerInstance ¶
func GetGrafanaInstance ¶
func GetPDInstances ¶
func GetPrometheusInstance ¶
func GetStoreInstances ¶
func GetStoreInstances(ctx context.Context, pdAPI *pdclient.APIClient) ([]topo.TiKVStoreInfo, []topo.TiFlashStoreInfo, error)
GetStoreInstances returns TiKV info and TiFlash info.
func GetTiDBInstances ¶
func NewTopologyProviderFromPD ¶
func NewTopologyProviderFromPD(etcdClient *clientv3.Client, pdAPI *pdclient.APIClient) topo.TopologyProvider
NewTopologyProviderFromPD creates a provider that gets topology information from PD. The base URL of the PD API client must be correctly set.
Types ¶
type TopologyFromPD ¶
type TopologyFromPD struct {
// contains filtered or unexported fields
}
TopologyFromPD provides the topology information from PD.
func (*TopologyFromPD) GetAlertManager ¶
func (p *TopologyFromPD) GetAlertManager(ctx context.Context) (*topo.AlertManagerInfo, error)
func (*TopologyFromPD) GetGrafana ¶
func (p *TopologyFromPD) GetGrafana(ctx context.Context) (*topo.GrafanaInfo, error)
func (*TopologyFromPD) GetPrometheus ¶
func (p *TopologyFromPD) GetPrometheus(ctx context.Context) (*topo.PrometheusInfo, error)
func (*TopologyFromPD) GetTiFlash ¶
func (p *TopologyFromPD) GetTiFlash(ctx context.Context) ([]topo.TiFlashStoreInfo, error)
func (*TopologyFromPD) GetTiKV ¶
func (p *TopologyFromPD) GetTiKV(ctx context.Context) ([]topo.TiKVStoreInfo, error)
Click to show internal directories.
Click to hide internal directories.