zookeeper

package
v1.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleClientRestart

func HandleClientRestart(r ZkClientFacade)

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

func NewZkClient

func NewZkClient(zkName string, config *model.RemoteConfig) (*gxzookeeper.ZookeeperClient, error)

func ValidateZookeeperClient

func ValidateZookeeperClient(container ZkClientFacade, zkName string) error

Types

type Listener

type Listener interface {
	// Close closes this listener
	Close()
	// WatchAndHandle watch the target path and handle the event
	WatchAndHandle()
}

type ZkClientFacade

type ZkClientFacade interface {
	Name() string
	ZkClient() *gxzookeeper.ZookeeperClient
	SetZkClient(*gxzookeeper.ZookeeperClient)
	ZkClientLock() *sync.Mutex
	WaitGroup() *sync.WaitGroup // for wait group control, zk client listener & zk client container
	Done() chan struct{}        // for registry destroy
	RestartCallBack() bool
	GetConfig() *model.RemoteConfig
}

Jump to

Keyboard shortcuts

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