pub struct QueryParameters {
pub query_type: QueryType,
pub base_repeat_interval: Option<Duration>,
pub max_repeat_interval: Option<Duration>,
pub exponential_backoff: bool,
pub timeout_after: Option<Duration>,
}Expand description
Controls how to perform the query. You will typically use one of the associated constants DISCOVERY, SERVICE_LOOKUP, HOST_LOOKUP
Fields§
§query_type: QueryType§base_repeat_interval: Option<Duration>If specified, the query will be re-issued after this duration
max_repeat_interval: Option<Duration>The maximum interval between retries
exponential_backoff: boolIf true, repeat interval will be doubled on each iteration until it reaches the max_repeat_interval. If false, it will increment by base_repeat_interval on each iteration until it reaches the max_repeat_interval.
timeout_after: Option<Duration>If set, specifies the upper bound on total time spent processing the request. Otherwise, the request will keep going forever, subject to the repeat interval.
Implementations§
Source§impl QueryParameters
impl QueryParameters
Sourcepub const DISCOVERY: QueryParameters
pub const DISCOVERY: QueryParameters
Parameters suitable for performing long-running discovery. Repeatedly performs a PTR lookup with exponential backoff ranging from 2 seconds up to 5 minutes.
Sourcepub const SERVICE_LOOKUP: QueryParameters
pub const SERVICE_LOOKUP: QueryParameters
Parameters suitable for performing short-lived discovery. Repeatedly performs a PTR lookup with exponential backoff ranging from 2 seconds up to 5 minutes.
Sourcepub const HOST_LOOKUP: QueryParameters
pub const HOST_LOOKUP: QueryParameters
Parameters suitable for resolving a single host. Performs an A lookup with exponential backoff ranging from 1 second. The overall lookup will timeout after 1 minutes.
pub fn with_timeout(self, timeout: Duration) -> Self
Trait Implementations§
Source§impl Clone for QueryParameters
impl Clone for QueryParameters
Source§fn clone(&self) -> QueryParameters
fn clone(&self) -> QueryParameters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more