discovery

package
v1.7.20 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DogDiscovery

type DogDiscovery interface {
	Start() error
	Close()
	Watch(key, node string) error
	WatchMulti(nodes map[string]string) error
	AddNode(key string, info service.NodeInfo)
	DelNode(key string, addr string)
	GetNodeInfo(key string) (nodesInfo []service.NodeInfo)
}

type EtcdConfig

type EtcdConfig struct {
	Host      []string // etcd server host
	TlsConfig *tls.Config
}

type EtcdDiscovery

type EtcdDiscovery struct {
	EtcdConfig   *EtcdConfig `inject:"etcdConfig" canNil:"true"`
	EtcdConf     *ini.File   `inject:"etcdConf" canNil:"true"`
	EtcdConfPath string      `inject:"etcdConfPath" canNil:"true"`
	// contains filtered or unexported fields
}

Encapsulates the etcd discovery

func (*EtcdDiscovery) AddNode

func (e *EtcdDiscovery) AddNode(key string, info service.NodeInfo)

func (*EtcdDiscovery) Close

func (e *EtcdDiscovery) Close()

func (*EtcdDiscovery) DelNode

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

func (*EtcdDiscovery) GetNodeInfo

func (e *EtcdDiscovery) GetNodeInfo(key string) []service.NodeInfo

func (*EtcdDiscovery) Start

func (e *EtcdDiscovery) Start() error

func (*EtcdDiscovery) Watch

func (e *EtcdDiscovery) Watch(key, path string) error

func (*EtcdDiscovery) WatchMulti

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

type EtcdNode

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

type ZkConfig

type ZkConfig struct {
	Host []string // zk server host
}

type ZkDiscovery

type ZkDiscovery struct {
	ZkConfig   *ZkConfig `inject:"zkConfig" canNil:"true"`
	ZkConf     *ini.File `inject:"zkConf" canNil:"true"`
	ZkConfPath string    `inject:"zkConfPath" canNil:"true"`
	// contains filtered or unexported fields
}

Encapsulates the zookeeper discovery

func (*ZkDiscovery) AddNode

func (z *ZkDiscovery) AddNode(key string, info service.NodeInfo)

func (*ZkDiscovery) Close

func (z *ZkDiscovery) Close()

func (*ZkDiscovery) DelNode

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

func (*ZkDiscovery) GetNodeInfo

func (z *ZkDiscovery) GetNodeInfo(key string) []service.NodeInfo

func (*ZkDiscovery) Start

func (z *ZkDiscovery) Start() error

func (*ZkDiscovery) Watch

func (z *ZkDiscovery) Watch(key, path string) error

func (*ZkDiscovery) WatchMulti

func (z *ZkDiscovery) WatchMulti(nodes map[string]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