Trait zookeeper::ZooKeeperExt
source · pub trait ZooKeeperExt {
// Required methods
fn ensure_path(&self, path: &str) -> ZkResult<()>;
fn get_children_recursive(&self, path: &str) -> ZkResult<Vec<String>>;
fn delete_recursive(&self, path: &str) -> ZkResult<()>;
}
Expand description
Extended ZooKeeper operations that are not needed for the “core.”
Required Methods§
sourcefn ensure_path(&self, path: &str) -> ZkResult<()>
fn ensure_path(&self, path: &str) -> ZkResult<()>
Ensure that path
exists and create all potential paths leading up to it if it does not.
This operates in a manner similar to mkdir -p
.
sourcefn get_children_recursive(&self, path: &str) -> ZkResult<Vec<String>>
fn get_children_recursive(&self, path: &str) -> ZkResult<Vec<String>>
Performs a breadth-first tree traversal of the tree starting at path
,
returning a list of fully prefixed child nodes.
NOTE: This is not an atomic operation.
sourcefn delete_recursive(&self, path: &str) -> ZkResult<()>
fn delete_recursive(&self, path: &str) -> ZkResult<()>
Deletes the node at path
and all its children.
NOTE: This is not an atomic operation.