discovery

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: MIT Imports: 9 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 EtcdDiscovery

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

Encapsulates the etcd discovery

func (*EtcdDiscovery) AddNode

func (e *EtcdDiscovery) AddNode(node string, info *server.NodeInfo)

func (*EtcdDiscovery) Close

func (e *EtcdDiscovery) Close() error

func (*EtcdDiscovery) DelNode

func (e *EtcdDiscovery) DelNode(node string, key string)

func (*EtcdDiscovery) GetNodeInfo

func (e *EtcdDiscovery) GetNodeInfo(node string) []server.NodeInfo

func (*EtcdDiscovery) NewDiscovery

func (e *EtcdDiscovery) NewDiscovery(dns []string)

func (*EtcdDiscovery) Run

func (e *EtcdDiscovery) Run() error

func (*EtcdDiscovery) Watch

func (e *EtcdDiscovery) Watch(node string) error

func (*EtcdDiscovery) WatchMulti

func (e *EtcdDiscovery) WatchMulti(nodes []string) error

type EtcdNode

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

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