Documentation ¶
Index ¶
- Variables
- func AddHosts(zk *zookeeper.Conn, pool string, hosts map[string]config.Host) error
- func ArrayDiff(curr, prev []string) []string
- func DelHosts(zk *zookeeper.Conn, pool string, hosts []string) error
- func DelPool(zk *zookeeper.Conn, name string) error
- func DelPort(zk *zookeeper.Conn, port uint16) error
- func DelRule(zk *zookeeper.Conn, name string) error
- func DelTrie(zk *zookeeper.Conn, name string) error
- func GetHosts(zk *zookeeper.Conn, pool string) (map[string]config.Host, error)
- func GetPool(zk *zookeeper.Conn, name string) (config.Pool, error)
- func GetPort(zk *zookeeper.Conn, portUint uint16) (port config.Port, err error)
- func GetRule(zk *zookeeper.Conn, name string) (rule config.Rule, err error)
- func GetTrie(zk *zookeeper.Conn, name string) (trie config.Trie, err error)
- func ListPools(zk *zookeeper.Conn) ([]string, error)
- func ListPorts(zk *zookeeper.Conn) ([]uint16, error)
- func ListRules(zk *zookeeper.Conn) ([]string, error)
- func ListTries(zk *zookeeper.Conn) ([]string, error)
- func PoolExists(zk *zookeeper.Conn, name string) (bool, error)
- func PortExists(zk *zookeeper.Conn, port uint16) (bool, error)
- func RuleExists(zk *zookeeper.Conn, name string) (bool, error)
- func SetPool(zk *zookeeper.Conn, pool config.Pool) error
- func SetPort(zk *zookeeper.Conn, port config.Port) error
- func SetRule(zk *zookeeper.Conn, rule config.Rule) error
- func SetTrie(zk *zookeeper.Conn, trie config.Trie) error
- func SetZkRoot(root string)
- func TrieExists(zk *zookeeper.Conn, name string) (bool, error)
- type EventCallbacks
- type ZkConn
- type ZkPool
Constants ¶
This section is empty.
Variables ¶
View Source
var ZkPaths map[string]string = map[string]string{
"pools": "/pools",
"rules": "/rules",
"tries": "/tries",
"ports": "/ports",
}
Functions ¶
func PoolExists ¶
func PortExists ¶
func RuleExists ¶
func TrieExists ¶
Types ¶
type EventCallbacks ¶
type ZkConn ¶
type ZkConn struct { sync.Mutex ResetCh chan bool Conn *zookeeper.Conn // contains filtered or unexported fields }
func ManagedZkConn ¶
func (*ZkConn) IsConnected ¶
func (*ZkConn) ManageNode ¶
func (z *ZkConn) ManageNode(node string, callbacks EventCallbacks) error
func (*ZkConn) ManageTree ¶
func (z *ZkConn) ManageTree(node string, callbacks ...EventCallbacks)
Click to show internal directories.
Click to hide internal directories.