Struct async_consul::common::QueryOptions [−][src]
Options specific to query operations.
Fields
namespace: Option<String>
Namespace to execute this operation against.
NOTE: Namespaces are available only in Consul Enterprise.
datacenter: Option<String>
Datacenter to execute this operation against.
By default, operations will execute against whichever datacenter is configured at the endpoint you connect to, whether you're connected directly to a Consul cluster or to an agent.
token: Option<String>
Token to use for this operation.
By default, operations will use the agent's default token if talking to an agent, but will not use a token if talking directly to a Consul cluster.
consistency: Option<Consistency>
Consistency level for this operation.
blocking: Option<Blocking>
Blocking configuration for this operation.
blocking_timeout: Option<Duration>
Blocking timeout.
Only used if blocking
is set. This should be set lower than the overall timeout
in
order to ensure that Consul hasa chance to complete the request and send back results.
If blocking
is configured, and timeout
is set, but blocking_timeout
is not set, then a
timeout will be applied to the request overall, and callers may receive a timeout error
rather than a successful response from the server.
use_cache: bool
Asks the agent to cache results locally.
Users can refer to the Consul API documentation, [https://www.consul.io/api/features/caching.html], for more information on caching.
cache_max_age: Option<Duration>
Controls how old of a cached response this operation will accept from the agent.
If there is a cached response older than this, the agent treats it as a miss and will attempt to fetch the latest value. If that fetch fails, the error is returned.
For clients that wish to utilize a stale value in the case of an underlying error, they can
set [cache_stale_if_error
] to specify how old of a value they are willing to accept.
This value is ignored if the endpoint supports background refresh caching.
cache_stale_if_error: Option<Duration>
Controls how old of a cached response this operation will accept from the agent, but only if attempt to refresh the value has failed.
This value is ignored if the endpoint supports background refresh caching.
near: Option<String>
Sorting based on network latency.
Should be the name of a node, which will sort of the results in order of lowest to highest latency from the given node to each node in the results.
Optionally, _agent
can be specified to sort the results based on their latency to the agent.
node_meta: Option<HashMap<String, String>>
Filter results to nodes that match the specified node metadata values.
tag: Option<String>
Filter results to nodes that have a tag matching the specified tag.
filtering: Option<String>
Filtering reduces network load by filtering results on the server prior to responding.
Users can refer to the Consul API documentation, [https://www.consul.io/api-docs/features/filtering], to read about filtering.
relay_factor: Option<u8>
Used in keyring operations to force responses to be relayed back to the send through N other random nodes. Most be a value from 0 to 5 (inclusive).
local_only: bool
Used in keyring list operations to force the keyring query to only hit local servers i.e. no WAN traffic.
connect: bool
Only include Connect-capable services/nodes in the response.
Currently only affects prepared query operations.
timeout: Option<Duration>
Timeout for this operation overall.
Trait Implementations
impl Clone for QueryOptions
[src]
fn clone(&self) -> QueryOptions
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for QueryOptions
[src]
impl Default for QueryOptions
[src]
fn default() -> QueryOptions
[src]
Auto Trait Implementations
impl RefUnwindSafe for QueryOptions
[src]
impl Send for QueryOptions
[src]
impl Sync for QueryOptions
[src]
impl Unpin for QueryOptions
[src]
impl UnwindSafe for QueryOptions
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,