Documentation ¶
Overview ¶
zk provides with higher level commands over the lower level zookeeper connector
Index ¶
- func BuildACL(authScheme string, user string, pwd string, acls string) (perms []zk.ACL, err error)
- func Children(path string) ([]string, error)
- func ChildrenRecursive(path string) ([]string, error)
- func Create(path string, data []byte, aclstr string, force bool) (string, error)
- func CreateWithACL(path string, data []byte, force bool, perms []zk.ACL) (string, error)
- func Delete(path string) error
- func DeleteRecursive(path string) error
- func Exists(path string) (bool, error)
- func Get(path string) ([]byte, error)
- func GetACL(path string) (data []string, err error)
- func Set(path string, data []byte) (*zk.Stat, error)
- func SetACL(path string, aclstr string, force bool) (string, error)
- func SetAuth(scheme string, auth []byte)
- func SetServers(serversArray []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Children ¶
Children returns sub-paths of given path, optionally empty array, or error if path does not exist
func ChildrenRecursive ¶ added in v1.0.1
ChildrenRecursive returns list of all descendants of given path (optionally empty), or error if the path does not exist. Every element in result list is a relative subpath for the given path.
func Create ¶
Create will create a new path, or exit with error should the path exist. The "force" param controls the behavior when path's parent directory does not exist. When "force" is false, the function returns with error/ When "force" is true, it recursively attempts to create required parent directories.
func CreateWithACL ¶ added in v1.0.7
func Delete ¶
Delete removes a path entry. It exits with error if the path does not exist, or has subdirectories.
func DeleteRecursive ¶ added in v1.0.8
Delete recursive if has subdirectories.
func SetServers ¶
func SetServers(serversArray []string)
SetServers sets the list of servers for the zookeeper client to connect to. Each element in the array should be in either of following forms: - "servername" - "servername:port"
Types ¶
This section is empty.