etcdv3

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleClientRestart

func HandleClientRestart(r clientFacade)

HandleClientRestart keeps the connection between client and server This method should be used only once. You can use handleClientRestart() in package registry.

func NewServiceDiscoveryClient

func NewServiceDiscoveryClient(opts ...gxetcd.Option) *gxetcd.Client

nolint

func ValidateClient

func ValidateClient(container clientFacade, opts ...gxetcd.Option) error

ValidateClient validates client and sets options

Types

type EventListener

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

nolint

func NewEventListener

func NewEventListener(client *gxetcd.Client) *EventListener

NewEventListener returns a EventListener instance

func (*EventListener) Close

func (l *EventListener) Close()

nolint

func (*EventListener) ListenServiceEvent

func (l *EventListener) ListenServiceEvent(key string, listener remoting.DataListener)

ListenServiceEvent is invoked by etcdv3 ConsumerRegistry::Registe/ etcdv3 ConsumerRegistry::get/etcdv3 ConsumerRegistry::getListener registry.go:Listen -> listenServiceEvent -> listenDirEvent -> listenServiceNodeEvent registry.go:Listen -> listenServiceEvent -> listenServiceNodeEvent

func (*EventListener) ListenServiceNodeEvent

func (l *EventListener) ListenServiceNodeEvent(key string, listener ...remoting.DataListener) bool

ListenServiceNodeEvent Listen on a spec key.It will return true when spec key deleted, and return false when deep layer connection lose

func (*EventListener) ListenServiceNodeEventWithPrefix

func (l *EventListener) ListenServiceNodeEventWithPrefix(prefix string, listener ...remoting.DataListener)

ListenServiceNodeEventWithPrefix listens on a set of key with spec prefix

Jump to

Keyboard shortcuts

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