Documentation ¶
Index ¶
- Variables
- func DefaultAddrs() (nodes []string, err error)
- func DefaultAddrsTXT() string
- func SetDefaultAddrsTXT(txt string)
- type ZKClient
- func (zkClient *ZKClient) Addrs() []string
- func (zkClient *ZKClient) Close() (err error)
- func (zkClient *ZKClient) Exists() (exists bool, err error)
- func (zkClient *ZKClient) Mirror() (snapshots chan map[string][]byte, errors chan error)
- func (zkClient *ZKClient) Name() string
- func (zkClient *ZKClient) Nodes() (nodeValues map[string][]byte, err error)
- func (zkClient *ZKClient) Register(name string, value []byte) (err error)
- func (zkClient *ZKClient) Update(value []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrClosedInstance 实例已关闭 ErrClosedInstance = errors.New("Closed instance") // ErrNodesNeeded 未指定节点 ErrNodesNeeded = errors.New("Nodes needed") )
Functions ¶
Types ¶
type ZKClient ¶
type ZKClient struct {
// contains filtered or unexported fields
}
ZKClient zookeeper client
func (*ZKClient) Mirror ¶
Mirror 指定路径的snapshots chan, 每个snapshot如 map[string][]byte{"ip:port":"value","ip:port":"value"}
Click to show internal directories.
Click to hide internal directories.