Documentation ¶
Index ¶
- type Cluster
- type ClusterManager
- func (s *ClusterManager) GetInstanceHost() string
- func (s *ClusterManager) GetInstanceID() string
- func (s *ClusterManager) GetSuitableInstance(serviceID string) *discover.Instance
- func (s *ClusterManager) MessageRadio(mes ...db.ClusterMessage)
- func (s *ClusterManager) Scrape(ch chan<- prometheus.Metric, namespace, exporter string) error
- func (s *ClusterManager) Start() error
- func (s *ClusterManager) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster interface { //获取一个承接日志的节点 GetSuitableInstance(serviceID string) *discover.Instance //集群消息广播 MessageRadio(...db.ClusterMessage) Start() error Stop() GetInstanceID() string GetInstanceHost() string Scrape(ch chan<- prometheus.Metric, namespace, exporter string) error }
Cluster 集群模块对外服务
type ClusterManager ¶
type ClusterManager struct { Conf conf.ClusterConf // contains filtered or unexported fields }
ClusterManager 控制器
func (*ClusterManager) GetInstanceHost ¶
func (s *ClusterManager) GetInstanceHost() string
func (*ClusterManager) GetInstanceID ¶
func (s *ClusterManager) GetInstanceID() string
func (*ClusterManager) GetSuitableInstance ¶
func (s *ClusterManager) GetSuitableInstance(serviceID string) *discover.Instance
GetSuitableInstance 获取适合的日志接收节点
func (*ClusterManager) MessageRadio ¶
func (s *ClusterManager) MessageRadio(mes ...db.ClusterMessage)
MessageRadio 消息广播
func (*ClusterManager) Scrape ¶
func (s *ClusterManager) Scrape(ch chan<- prometheus.Metric, namespace, exporter string) error
Scrape prometheus monitor metrics
Click to show internal directories.
Click to hide internal directories.