pub struct LockWatchRequest<'a> {
pub key: &'a str,
pub datacenter: &'a str,
pub namespace: &'a str,
pub consistency: ConsistencyMode,
pub index: Option<u64>,
pub wait: Duration,
}Expand description
Represents a request to read a key from Consul’s Key Value store.
Fields§
§key: &'a strSpecifies the path of the key to read.
datacenter: &'a strSpecifies the datacenter to query. This will default to the datacenter of the agent being queried.
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. For recursive lookups, the namespace may be specified as ‘*’ and then results will be returned for all namespaces. Added in Consul 1.7.0.
consistency: ConsistencyModeThe consistency mode for reads. See also ConsistencyMode
index: Option<u64>Endpoints that support blocking queries return an HTTP header named X-Consul-Index. This is a unique identifier representing the current state of the requested resource. On subsequent requests for this resource, the client can set the index query string parameter to the value of X-Consul-Index, indicating that the client wishes to wait for any changes subsequent to that index.
wait: DurationThe time to wait for watching a lock in a blocking fashion.
Implementations§
Source§impl<'a> LockWatchRequest<'a>
impl<'a> LockWatchRequest<'a>
Sourcepub fn builder() -> LockWatchRequestBuilder<'a>
pub fn builder() -> LockWatchRequestBuilder<'a>
Create an instance of LockWatchRequest using the builder syntax
Trait Implementations§
Source§impl<'a> Clone for LockWatchRequest<'a>
impl<'a> Clone for LockWatchRequest<'a>
Source§fn clone(&self) -> LockWatchRequest<'a>
fn clone(&self) -> LockWatchRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more