etcd_discovery

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdDiscovery

type EtcdDiscovery struct {
	discovery.ServiceDiscovery
	// contains filtered or unexported fields
}

EtcdDiscovery

func NewEtcdDiscovery

func NewEtcdDiscovery(conf clientv3.Config) *EtcdDiscovery

NewEtcdDiscovery return a EtcdDiscovery

func (*EtcdDiscovery) Close

func (s *EtcdDiscovery) Close() error

Close closes the etcd client

func (*EtcdDiscovery) GetServerList added in v1.0.1

func (s *EtcdDiscovery) GetServerList() (map[string]string, error)

func (*EtcdDiscovery) ListenLeaseRespChan

func (s *EtcdDiscovery) ListenLeaseRespChan()

ListenLeaseRespChan Monitor lease renewals

func (*EtcdDiscovery) Register

func (s *EtcdDiscovery) Register() error

Register registers the nodeId and notify other nodes

func (*EtcdDiscovery) SetNodeAddr added in v1.0.1

func (this *EtcdDiscovery) SetNodeAddr(nodeAddr string)

SetNodeAddr sets a nodeAddr

func (*EtcdDiscovery) WatchService

func (s *EtcdDiscovery) WatchService(watchChan discovery.WatchChan)

WatchService Listens for a new node to start

Jump to

Keyboard shortcuts

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