discovery

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxNodeNum = 128
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DogDiscovery

type DogDiscovery interface {
	NewDiscovery(dns []string)
	Watch(node string) error
	WatchMulti(nodes []string) error
	AddNode(node string, info *server.NodeInfo)
	DelNode(node string, key string)
	GetNodeInfo(node string) (nodesInfo []server.NodeInfo)
	Run() error
	Close() error
}

type ZkDiscovery

type ZkDiscovery struct {
	// contains filtered or unexported fields
}

Encapsulates the zookeeper discovery

func (*ZkDiscovery) AddNode

func (z *ZkDiscovery) AddNode(node string, info *server.NodeInfo)

func (*ZkDiscovery) Close

func (z *ZkDiscovery) Close() error

func (*ZkDiscovery) DelNode

func (z *ZkDiscovery) DelNode(node string, key string)

func (*ZkDiscovery) GetNodeInfo

func (z *ZkDiscovery) GetNodeInfo(node string) []server.NodeInfo

func (*ZkDiscovery) NewDiscovery

func (z *ZkDiscovery) NewDiscovery(dns []string)

func (*ZkDiscovery) Run

func (z *ZkDiscovery) Run() error

func (*ZkDiscovery) Watch

func (z *ZkDiscovery) Watch(node string) error

func (*ZkDiscovery) WatchMulti

func (z *ZkDiscovery) WatchMulti(nodes []string) error

type ZkNode

type ZkNode struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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