Set the node's data if the provided preconditions apply to the existing state of the node.
Set the node's data if the provided preconditions apply to the existing state of the node.
If prevIndex
is specified, the current node must have the
provided index
value.
If prevValue
is specified, the current node must have the
provided value.
If prevExist
is false, the node is not required to exist.
Create a new key.
Create a new key.
If the key exists, an error is returned.
If value is None, the key is treated as a directory. In order to
create an empty data node, use Some(Buf.Empty)
.
Optionally, a ttl
may be specified to inform etcd to remove the
node after some time period (only second-granularity is supported
by etcd).
Delete a node.
Delete a node.
If dir
is not true and the key is a directory, this will
operation fail.
If dir
and recursive
are true, the entire tree is deleted.
An Event constructed by watching an etcd key.
An Event constructed by watching an etcd key.
If recursive
is true, the key's subtree is observed for
changes.
When an unexpected error is encountered communicating with the
API, the failure is published on the Event and the backoff
stream is used to compute the time to wait before retrying. If
the backoff
stream is exhausted or a fatal error is
encountered, it is reported and polling stops.
The Event is not reference-counted, so each observer initiates its own polling loop. This ensures that the initial state of a tree is reported properly.
Set the contents of a key.
Set the contents of a key.
If recursive
is true and this key is a directory, the returned
Node contains the entire tree of children.
If wait
is true and waitIndex
is specified, a response is not
received until the node (or one of its children, if recursive
is specified) is updated. If wait
is true and waitIndex
is
not specified, a response is not received until the next update
to this node (or its children, if recursive
).
If quorum
is specified, etcd will ensure that the etcd instance
is at quorum with the cluster.
Set the contents of a key.
Set the contents of a key.
If value is None, the key is treated as a directory. In order to
unset the value of a data node, use Some(Buf.Empty)
.
Optionally, a ttl
may be specified to inform etcd to remove the
node after some time period (only second-granularity is supported
by etcd).
If prevExist
is true, the node operation will fail if the node
does not already exist.