Function etcd::kv::set_dir [] [src]

pub fn set_dir<C>(
    client: &Client<C>,
    key: &str,
    ttl: Option<u64>
) -> FutureKeyValueInfo where
    C: Clone + Connect

Sets the key to an empty directory.

An existing key-value pair will be replaced, but an existing directory will not.

Parameters

  • client: A Client to use to make the API call.
  • key: The name of the directory to set.
  • ttl: If given, the node will expire after this many seconds.

Errors

Fails if the node is an existing directory.