Documentation ¶
Index ¶
- type NodeNameEvent
- type ZKConfig
- type ZookeeperClient
- func (zClient *ZookeeperClient) ChildrenW(path string) ([]string, *zk.Stat, <-chan zk.Event, error)
- func (zClient *ZookeeperClient) Create(path string, data []byte, flags int32, acl []zk.ACL, ...) (string, error)
- func (zClient *ZookeeperClient) Exists(path string) (bool, error)
- func (zClient *ZookeeperClient) Get(path string) ([]byte, *zk.Stat, error)
- func (zClient *ZookeeperClient) LeaderElection(path string, startFunc, stopFunc func()) (quitHandler func(), err error)
- func (zClient *ZookeeperClient) NodeNameW(path string, nameContext context.Context) (<-chan NodeNameEvent, error)
- func (zClient *ZookeeperClient) Update(path string, data []byte, version int32) (*zk.Stat, error)
- func (zClient *ZookeeperClient) WatchForever(path string, nameContext context.Context) (chan []byte, error)
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 ZookeeperClient ¶
type ZookeeperClient struct { Config *ZKConfig // contains filtered or unexported fields }
func NewZKClient ¶
func NewZKClient(config *ZKConfig) (*ZookeeperClient, 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) WatchForever ¶
Click to show internal directories.
Click to hide internal directories.