Skip to content

Add expect initalization method #5

@volfco

Description

@volfco

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions