Function etcd::kv::update [] [src]

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

Updates an existing key-value pair.

Parameters

  • client: A Client to use to make the API call.
  • key: The name of the key-value pair to update.
  • value: The new value for the key-value pair.
  • ttl: If given, the node will expire after this many seconds.

Errors

Fails if the key does not exist.