discovery

package
v0.0.0-...-cb472e6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryInterface

type DiscoveryInterface interface {
	ApiServer() Interface
	MigrateServer() Interface
	EventServer() Interface
	HostServer() Interface
	ProcServer() Interface
	TopoServer() Interface
	DataCollect() Interface
	GseProcServer() Interface
	CoreService() Interface
	OperationServer() Interface
	TaskServer() Interface
	CloudServer() Interface
	AuthServer() Interface
	ServiceManageInterface
}

func NewMockDiscoveryInterface

func NewMockDiscoveryInterface() DiscoveryInterface

func NewServiceDiscovery

func NewServiceDiscovery(client *zk.ZkClient) (DiscoveryInterface, error)

NewServiceDiscovery new a simple discovery module which can be used to get alive server address

type Interface

type Interface interface {
	// 获取注册在zk上的所有服务节点
	GetServers() ([]string, error)
	// 最新的服务节点信息存放在该channel里,可被用来消费,以监听服务节点的变化
	GetServersChan() chan []string
}

type MockDiscovery

type MockDiscovery struct{}

func (*MockDiscovery) ApiServer

func (d *MockDiscovery) ApiServer() Interface

func (*MockDiscovery) AuditCtrl

func (d *MockDiscovery) AuditCtrl() Interface

func (*MockDiscovery) AuthServer

func (d *MockDiscovery) AuthServer() Interface

func (*MockDiscovery) CloudServer

func (d *MockDiscovery) CloudServer() Interface

func (*MockDiscovery) CoreService

func (d *MockDiscovery) CoreService() Interface

func (*MockDiscovery) DataCollect

func (d *MockDiscovery) DataCollect() Interface

func (*MockDiscovery) EventServer

func (d *MockDiscovery) EventServer() Interface

func (*MockDiscovery) GseProcServer

func (d *MockDiscovery) GseProcServer() Interface

func (*MockDiscovery) HostCtrl

func (d *MockDiscovery) HostCtrl() Interface

func (*MockDiscovery) HostServer

func (d *MockDiscovery) HostServer() Interface

func (*MockDiscovery) IsMaster

func (d *MockDiscovery) IsMaster() bool

func (*MockDiscovery) MigrateServer

func (d *MockDiscovery) MigrateServer() Interface

func (*MockDiscovery) ObjectCtrl

func (d *MockDiscovery) ObjectCtrl() Interface

func (*MockDiscovery) OperationServer

func (d *MockDiscovery) OperationServer() Interface

func (*MockDiscovery) ProcCtrl

func (d *MockDiscovery) ProcCtrl() Interface

func (*MockDiscovery) ProcServer

func (d *MockDiscovery) ProcServer() Interface

func (*MockDiscovery) TaskServer

func (d *MockDiscovery) TaskServer() Interface

func (*MockDiscovery) TopoServer

func (d *MockDiscovery) TopoServer() Interface

type ServiceManageInterface

type ServiceManageInterface interface {
	// 判断当前进程是否为master 进程, 服务注册节点的第一个节点
	IsMaster() bool
}

Jump to

Keyboard shortcuts

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