pub struct QueryOptionsBuilder { /* private fields */ }
Expand description
Builder for QueryOptions
.
Implementations§
Source§impl QueryOptionsBuilder
impl QueryOptionsBuilder
Sourcepub fn region(&mut self, value: String) -> &mut Self
pub fn region(&mut self, value: String) -> &mut Self
Providing a datacenter overwrites the region provided by the Config
Sourcepub fn allow_stale(&mut self, value: bool) -> &mut Self
pub fn allow_stale(&mut self, value: bool) -> &mut Self
AllowStale allows any Nomad server (non-leader) to service a read. This allows for lower latency and higher throughput
Sourcepub fn auth_token(&mut self, value: String) -> &mut Self
pub fn auth_token(&mut self, value: String) -> &mut Self
AuthToken is the secret ID of an ACL token
Sourcepub fn wait_index(&mut self, value: u64) -> &mut Self
pub fn wait_index(&mut self, value: u64) -> &mut Self
WaitIndex is used to enable a blocking query. Waits until the timeout or the next index is reached
Sourcepub fn prefix(&mut self, value: String) -> &mut Self
pub fn prefix(&mut self, value: String) -> &mut Self
If set, used as prefix for resource list searches
Sourcepub fn next_token(&mut self, value: String) -> &mut Self
pub fn next_token(&mut self, value: String) -> &mut Self
NextToken is the token used to indicate where to start paging for queries that support paginated lists. This token should be the ID of the next object after the last one seen in the previous response.
Sourcepub fn namespace(&mut self, value: String) -> &mut Self
pub fn namespace(&mut self, value: String) -> &mut Self
Namespace is the target namespace for the query.
Sourcepub fn filter(&mut self, value: String) -> &mut Self
pub fn filter(&mut self, value: String) -> &mut Self
Filter specifies the go-bexpr filter expression to be used for filtering the data prior to returning a response
Sourcepub fn reverse(&mut self, value: bool) -> &mut Self
pub fn reverse(&mut self, value: bool) -> &mut Self
Reverse is used to reverse the default order of list results.
Currently only supported by specific endpoints.
Sourcepub fn wait_time(&mut self, value: TimeDelta) -> &mut Self
pub fn wait_time(&mut self, value: TimeDelta) -> &mut Self
WaitTime is used to bound the duration of a wait. Defaults to that of the Config, but can be overridden.
Sourcepub fn params(&mut self, value: HashMap<String, String>) -> &mut Self
pub fn params(&mut self, value: HashMap<String, String>) -> &mut Self
Set HTTP parameters on the query.
Sourcepub fn headers(&mut self, value: HashMap<String, String>) -> &mut Self
pub fn headers(&mut self, value: HashMap<String, String>) -> &mut Self
Set HTTP headers on the query.
Sourcepub fn per_page(&mut self, value: i32) -> &mut Self
pub fn per_page(&mut self, value: i32) -> &mut Self
PerPage is the number of entries to be returned in queries that support paginated lists.
Sourcepub fn build(&self) -> Result<QueryOptions, QueryOptionsBuilderError>
pub fn build(&self) -> Result<QueryOptions, QueryOptionsBuilderError>
Trait Implementations§
Source§impl Clone for QueryOptionsBuilder
impl Clone for QueryOptionsBuilder
Source§fn clone(&self) -> QueryOptionsBuilder
fn clone(&self) -> QueryOptionsBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more