Documentation ¶
Index ¶
- type LiveNodeInfo
- type NodeInfo
- type PersistentNode
- type ServiceType
- type StateType
- type ZooKeeperClient
- func (z *ZooKeeperClient) Close() error
- func (z *ZooKeeperClient) CreateEphemeralNode(path string, data []byte) error
- func (z *ZooKeeperClient) CreateNode(path string, data []byte) error
- func (z *ZooKeeperClient) CreatePath(path string) error
- func (z *ZooKeeperClient) CreatePersistentNode(path string, obj interface{}) (interface{}, error)
- func (z *ZooKeeperClient) Delete(path string, delChildren bool) error
- func (z *ZooKeeperClient) Exists(path string) bool
- func (z *ZooKeeperClient) GetChildren(root string) ([]string, error)
- func (z *ZooKeeperClient) GetData(path string) ([]byte, error)
- func (z *ZooKeeperClient) GetNode(path string) (interface{}, error)
- func (z *ZooKeeperClient) GetNodes(path string) ([]interface{}, error)
- func (z *ZooKeeperClient) GetStringData(path string) (string, error)
- func (z *ZooKeeperClient) SetByte(path string, b []byte) error
- func (z *ZooKeeperClient) SetData(path string, data []byte, mode curator.CreateMode) error
- func (z *ZooKeeperClient) SetObject(path string, obj interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LiveNodeInfo ¶
type PersistentNode ¶
type PersistentNode struct {
// contains filtered or unexported fields
}
func NewPersistentNode ¶
func NewPersistentNode(client curator.CuratorFramework, mode curator.CreateMode, protection bool, basePath string, initData []byte) *PersistentNode
func (*PersistentNode) ActualPath ¶
func (p *PersistentNode) ActualPath() string
func (*PersistentNode) Close ¶
func (p *PersistentNode) Close() error
func (*PersistentNode) GetData ¶
func (p *PersistentNode) GetData() []byte
func (*PersistentNode) IsAuthFailure ¶
func (p *PersistentNode) IsAuthFailure() bool
func (*PersistentNode) SetData ¶
func (p *PersistentNode) SetData(d []byte) error
func (*PersistentNode) Start ¶
func (p *PersistentNode) Start() error
type ZooKeeperClient ¶
type ZooKeeperClient struct {
// contains filtered or unexported fields
}
func NewZooKeeperClient ¶
func NewZooKeeperClient(connStr string) (*ZooKeeperClient, error)
func (*ZooKeeperClient) Close ¶
func (z *ZooKeeperClient) Close() error
func (*ZooKeeperClient) CreateEphemeralNode ¶
func (z *ZooKeeperClient) CreateEphemeralNode(path string, data []byte) error
func (*ZooKeeperClient) CreateNode ¶
func (z *ZooKeeperClient) CreateNode(path string, data []byte) error
func (*ZooKeeperClient) CreatePath ¶
func (z *ZooKeeperClient) CreatePath(path string) error
func (*ZooKeeperClient) CreatePersistentNode ¶
func (z *ZooKeeperClient) CreatePersistentNode(path string, obj interface{}) (interface{}, error)
func (*ZooKeeperClient) Delete ¶
func (z *ZooKeeperClient) Delete(path string, delChildren bool) error
func (*ZooKeeperClient) Exists ¶
func (z *ZooKeeperClient) Exists(path string) bool
func (*ZooKeeperClient) GetChildren ¶
func (z *ZooKeeperClient) GetChildren(root string) ([]string, error)
GetChildren return all leaf-node paths under root
func (*ZooKeeperClient) GetNode ¶
func (z *ZooKeeperClient) GetNode(path string) (interface{}, error)
func (*ZooKeeperClient) GetNodes ¶
func (z *ZooKeeperClient) GetNodes(path string) ([]interface{}, error)
func (*ZooKeeperClient) GetStringData ¶
func (z *ZooKeeperClient) GetStringData(path string) (string, error)
func (*ZooKeeperClient) SetData ¶
func (z *ZooKeeperClient) SetData(path string, data []byte, mode curator.CreateMode) error
func (*ZooKeeperClient) SetObject ¶
func (z *ZooKeeperClient) SetObject(path string, obj interface{}) error
Click to show internal directories.
Click to hide internal directories.