Documentation ¶
Index ¶
- type ZkManager
- func (z *ZkManager) Close()
- func (z *ZkManager) GetConnect() error
- func (z *ZkManager) GetPathData(nodePath string) ([]byte, *zk.Stat, error)
- func (z *ZkManager) GetServerListByPath(path string) (list []string, err error)
- func (z *ZkManager) RegistServerPath(nodePath, host string) (err error)
- func (z *ZkManager) SetPathData(nodePath string, config []byte, version int32) (err error)
- func (z *ZkManager) WatchPathData(nodePath string) (chan []byte, chan error)
- func (z *ZkManager) WatchServerListByPath(path string) (chan []string, chan error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZkManager ¶
type ZkManager struct {
// contains filtered or unexported fields
}
ZkManager ZkManager
func (*ZkManager) GetPathData ¶
GetPathData 获取配置
func (*ZkManager) GetServerListByPath ¶
GetServerListByPath 获取服务列表
func (*ZkManager) RegistServerPath ¶
RegistServerPath 创建临时节点 nodePath 主节点 host 要注册的子节点
func (*ZkManager) SetPathData ¶
SetPathData 更新配置
func (*ZkManager) WatchPathData ¶
WatchPathData watch机制,监听节点值变化
Click to show internal directories.
Click to hide internal directories.