rainbond: github.com/goodrain/rainbond/eventlog/cluster Index | Files | Directories

package cluster

import "github.com/goodrain/rainbond/eventlog/cluster"

Index

Package Files

cluster.go

type Cluster Uses

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 集群模块对外服务

func NewCluster Uses

func NewCluster(conf conf.ClusterConf, log *logrus.Entry, storeManager store.Manager) Cluster

NewCluster 创建集群控制器

type ClusterManager Uses

type ClusterManager struct {
    Conf conf.ClusterConf
    // contains filtered or unexported fields
}

ClusterManager 控制器

func (*ClusterManager) GetInstanceHost Uses

func (s *ClusterManager) GetInstanceHost() string

func (*ClusterManager) GetInstanceID Uses

func (s *ClusterManager) GetInstanceID() string

func (*ClusterManager) GetSuitableInstance Uses

func (s *ClusterManager) GetSuitableInstance(serviceID string) *discover.Instance

GetSuitableInstance 获取适合的日志接收节点

func (*ClusterManager) MessageRadio Uses

func (s *ClusterManager) MessageRadio(mes ...db.ClusterMessage)

MessageRadio 消息广播

func (*ClusterManager) Scrape Uses

func (s *ClusterManager) Scrape(ch chan<- prometheus.Metric, namespace, exporter string) error

Scrape prometheus monitor metrics

func (*ClusterManager) Start Uses

func (s *ClusterManager) Start() error

Start 启动

func (*ClusterManager) Stop Uses

func (s *ClusterManager) Stop()

Stop 停止

Directories

PathSynopsis
connect
discover
distribution

Package cluster imports 11 packages (graph) and is imported by 3 packages. Updated 2019-03-16. Refresh now. Tools for package owners.