cluster

package
v3.4.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2018 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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

func NewCluster

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

NewCluster 创建集群控制器

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

func (*ClusterManager) Start

func (s *ClusterManager) Start() error

Start 启动

func (*ClusterManager) Stop

func (s *ClusterManager) Stop()

Stop 停止

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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