There should be an expect method added to ZkStruct that blocks until data appears in the assumed location. Like this:
zkstate::ZkState::expect(
zk.clone(),
"/testing"
).unwrap()
Expect should block until /testing/payload is populated by someone else. This is useful when you're creating a ZkState object from a ZooKeeper Watcher firing, and you get a notification that a node is appearing and you want to create a local copy of it. Using new requires a bogus struct that might be visible to listeners locally before this library populates it.
There should be an
expectmethod added to ZkStruct that blocks until data appears in the assumed location. Like this:Expect should block until
/testing/payloadis populated by someone else. This is useful when you're creating a ZkState object from a ZooKeeper Watcher firing, and you get a notification that a node is appearing and you want to create a local copy of it. Usingnewrequires a bogus struct that might be visible to listeners locally before this library populates it.