pub struct QueryOptions {
pub namespace: Option<String>,
pub datacenter: Option<String>,
pub timeout: Option<Duration>,
pub index: Option<u64>,
pub wait: Option<Duration>,
}Expand description
Query options for Consul endpoints.
Fields§
§namespace: Option<String>Specifies the namespace to use. If not provided, the namespace will be inferred from the request’s ACL token, or will default to the default namespace. This is specified as part of the URL as a query parameter. Added in Consul 1.7.0. NOTE: usage of this query parameter requires Consul enterprise.
datacenter: Option<String>Specifies the datacenter to query. This will default to the datacenter of the agent being queried. This is specified as part of the URL as a query parameter.
timeout: Option<Duration>The timeout to apply to the query, if any, defaults to 5s.
index: Option<u64>The index to supply as a query parameter, if the endpoint supports blocking queries.
wait: Option<Duration>The time to block for, when used in association with an index, if the endpoint supports blocking queries. Server side default of 5 minute is applied if not specified, with a limit of 10 minutes and maximum granularity of seconds.
Trait Implementations§
Source§impl Clone for QueryOptions
impl Clone for QueryOptions
Source§fn clone(&self) -> QueryOptions
fn clone(&self) -> QueryOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more