pub struct DeleteKeyRequest<'a> {
pub key: &'a str,
pub datacenter: &'a str,
pub recurse: bool,
pub check_and_set: u32,
pub namespace: &'a str,
}Expand description
Represents a request to delete a key or all keys sharing a prefix from Consul’s Key Value store.
Fields§
§key: &'a strSpecifies the path of the key to delete.
datacenter: &'a strSpecifies the datacenter to query. This will default to the datacenter of the agent being queried.
recurse: boolSpecifies to delete all keys which have the specified prefix. Without this, only a key with an exact match will be deleted.
check_and_set: u32Specifies to use a Check-And-Set operation. This is very useful as a building block for more complex synchronization primitives. The index must be greater than 0 for Consul to take any action: a 0 index will not delete the key. If the index is non-zero, the key is only deleted if the index matches the ModifyIndex of that key.
namespace: &'a strSpecifies the namespace to query. If not provided, the namespace will be inferred from the request’s ACL token, or will default to the default namespace.
Implementations§
Source§impl<'a> DeleteKeyRequest<'a>
impl<'a> DeleteKeyRequest<'a>
Sourcepub fn builder() -> DeleteKeyRequestBuilder<'a>
pub fn builder() -> DeleteKeyRequestBuilder<'a>
Create an instance of DeleteKeyRequest using the builder syntax
Trait Implementations§
Source§impl<'a> Clone for DeleteKeyRequest<'a>
impl<'a> Clone for DeleteKeyRequest<'a>
Source§fn clone(&self) -> DeleteKeyRequest<'a>
fn clone(&self) -> DeleteKeyRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more