Documentation ¶
Index ¶
Constants ¶
View Source
const ( ComponentTiDB = "tidb" ComponentTiKV = "tikv" ComponentTiFlash = "tiflash" ComponentPD = "pd" ComponentTiCDC = "ticdc" )
Variables ¶
This section is empty.
Functions ¶
func InitForTest ¶
func InitForTest(comps []Component)
Types ¶
type Component ¶
type Component struct { Name string `json:"name"` IP string `json:"ip"` Port uint `json:"port"` StatusPort uint `json:"status_port"` }
func GetCurrentComponent ¶
func GetCurrentComponent() []Component
type GetLatestTopology ¶
type GetLatestTopology = func() []Component
type ServerInfo ¶
type ServerInfo struct { GitHash string `json:"git_hash"` IP string `json:"ip"` Port uint64 `json:"listening_port"` StartTimestamp int64 `json:"start_timestamp"` }
ServerInfo is server static information. It will not be updated when server running. So please only put static information in ServerInfo struct.
type Subscriber ¶
type Subscriber = chan GetLatestTopology
func Subscribe ¶
func Subscribe() Subscriber
type TopologyDiscoverer ¶
func NewTopologyDiscoverer ¶
func NewTopologyDiscoverer(do *domain.Domain) (*TopologyDiscoverer, error)
func (*TopologyDiscoverer) Close ¶
func (d *TopologyDiscoverer) Close() error
func (*TopologyDiscoverer) Start ¶
func (d *TopologyDiscoverer) Start()
func (*TopologyDiscoverer) Subscribe ¶
func (d *TopologyDiscoverer) Subscribe() Subscriber
type TopologySyncer ¶
type TopologySyncer struct {
// contains filtered or unexported fields
}
func NewTopologySyncer ¶
func NewTopologySyncer(do *domain.Domain) *TopologySyncer
func (*TopologySyncer) Start ¶
func (s *TopologySyncer) Start()
func (*TopologySyncer) Stop ¶
func (s *TopologySyncer) Stop()
Click to show internal directories.
Click to hide internal directories.