zkhelpers

package
v0.0.0-...-116a328 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

zkhelpers contains functions that make it easier to work with the primitives provided by github.com/samuel/go-zookeeper. This is inspired by the ZkUtil class that is included in the official Java client library. The eventual goal is to contribute these functions to github.com/samuel/go-zookeeper

See http://grepcode.com/file/repo1.maven.org/maven2/org.apache.zookeeper/zookeeper/3.4.5/org/apache/zookeeper/ZKUtil.java

Index

Constants

View Source
const (
	DefaultRoot = "/"
)

Variables

This section is empty.

Functions

func DeleteRecursively

func DeleteRecursively(zkConn *zk.Conn, pathRoot string) error

DeleteRecursively will recursively delete the node with the given path. All versions of all nodes under the given node are deleted.

If there is an error with deleting one of the sub-nodes in the tree, this operation would abort and would be the responsibility of the caller to handle the same.

func IsInternalNode

func IsInternalNode(path string) bool

func ListSubtree

func ListSubtree(zkConn *zk.Conn, pathRoot string) ([]string, error)

ListSubtree - BFS Traversal of the system under pathRoot, with the entries in the list, in the same order as that of the traversal.

Important: This is not an atomic snapshot of the tree ever, but the state as it exists across multiple RPCs from zkClient to the ensemble.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL