zookeeper

package
v0.0.0-...-1570df8 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeNameEvent

type NodeNameEvent struct {
	NodeNames []string
}

func (*NodeNameEvent) GetNodeNames

func (nne *NodeNameEvent) GetNodeNames() []string

type ZKConfig

type ZKConfig struct {
	Hosts          []string
	SessionTimeout time.Duration
	RootPath       string
	RetryCount     int
	Paths          []string
	RetrySleep     time.Duration
}

type ZookeeperClient

type ZookeeperClient struct {
	Config *ZKConfig
	// contains filtered or unexported fields
}

func NewZKClient

func NewZKClient(config *ZKConfig) (*ZookeeperClient, error)

func (*ZookeeperClient) ChildrenW

func (zClient *ZookeeperClient) ChildrenW(path string) ([]string, *zk.Stat, <-chan zk.Event, error)

func (*ZookeeperClient) Create

func (zClient *ZookeeperClient) Create(path string, data []byte, flags int32, acl []zk.ACL, createParentContainerNodes bool) (string, error)

func (*ZookeeperClient) Exists

func (zClient *ZookeeperClient) Exists(path string) (bool, error)

func (*ZookeeperClient) Get

func (zClient *ZookeeperClient) Get(path string) ([]byte, *zk.Stat, error)

func (*ZookeeperClient) LeaderElection

func (zClient *ZookeeperClient) LeaderElection(path string, startFunc, stopFunc func()) (quitHandler func(), err error)

func (*ZookeeperClient) NodeNameW

func (zClient *ZookeeperClient) NodeNameW(path string, nameContext context.Context) (<-chan NodeNameEvent, error)

func (*ZookeeperClient) Update

func (zClient *ZookeeperClient) Update(path string, data []byte, version int32) (*zk.Stat, error)

func (*ZookeeperClient) WatchForever

func (zClient *ZookeeperClient) WatchForever(path string, nameContext context.Context) (chan []byte, error)

Jump to

Keyboard shortcuts

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