topology

package
v0.0.0-...-1f1d885 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentTiDB    = "tidb"
	ComponentTiKV    = "tikv"
	ComponentTiFlash = "tiflash"
	ComponentPD      = "pd"
	ComponentTiCDC   = "ticdc"
)

Variables

This section is empty.

Functions

func Init

func Init(do *domain.Domain) error

func InitForTest

func InitForTest(comps []Component)

func Stop

func Stop()

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

type TopologyDiscoverer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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()

Jump to

Keyboard shortcuts

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