[−][src]Struct conjure_runtime::Builder
A builder to construct Clients and blocking::Clients.
Implementations
impl Builder[src]
impl<T> Builder<T>[src]
pub fn from_config(&mut self, config: &ServiceConfig) -> &mut Self[src]
Applies configuration settings from a ServiceConfig to the builder.
pub fn service(&mut self, service: &str) -> &mut Self[src]
Sets the name of the service this client will communicate with.
This is used in logging and metrics to allow differentiation between different clients.
Required.
pub fn get_service(&self) -> Option<&str>[src]
Returns the builder's configured service name.
pub fn user_agent(&mut self, user_agent: UserAgent) -> &mut Self[src]
Sets the user agent sent by this client.
Required.
pub fn get_user_agent(&self) -> Option<&UserAgent>[src]
Returns the builder's configured user agent.
pub fn uri(&mut self, uri: Url) -> &mut Self[src]
Appends a URI to the URIs list.
Defaults to an empty list.
pub fn uris(&mut self, uris: Vec<Url>) -> &mut Self[src]
Sets the URIs list.
Defaults to an empty list.
pub fn get_uris(&self) -> &[Url][src]
Returns the builder's configured URIs list.
pub fn security(&mut self, security: SecurityConfig) -> &mut Self[src]
Sets the security configuration.
Defaults to an empty configuration.
pub fn get_security(&self) -> &SecurityConfig[src]
Returns the builder's configured security configuration.
pub fn proxy(&mut self, proxy: ProxyConfig) -> &mut Self[src]
Sets the proxy configuration.
Defaults to ProxyConfig::Direct (i.e. no proxy).
pub fn get_proxy(&self) -> &ProxyConfig[src]
Returns the builder's configured proxy configuration.
pub fn connect_timeout(&mut self, connect_timeout: Duration) -> &mut Self[src]
Sets the connect timeout.
Defaults to 10 seconds.
pub fn get_connect_timeout(&self) -> Duration[src]
Returns the builder's configured connect timeout.
pub fn read_timeout(&mut self, read_timeout: Duration) -> &mut Self[src]
Sets the read timeout.
This timeout applies to socket-level read attempts.
Defaults to 5 minutes.
pub fn get_read_timeout(&self) -> Duration[src]
Returns the builder's configured read timeout.
pub fn write_timeout(&mut self, write_timeout: Duration) -> &mut Self[src]
Sets the write timeout.
This timeout applies to socket-level write attempts.
Defaults to 5 minutes.
pub fn get_write_timeout(&self) -> Duration[src]
Returns the builder's configured write timeout.
pub fn backoff_slot_size(&mut self, backoff_slot_size: Duration) -> &mut Self[src]
Sets the backoff slot size.
This is the upper bound on the initial delay before retrying a request. It grows exponentially as additional attempts are made for a given request.
Defaults to 250 milliseconds.
pub fn get_backoff_slot_size(&self) -> Duration[src]
Returns the builder's configured backoff slot size.
pub fn max_num_retries(&mut self, max_num_retries: u32) -> &mut Self[src]
Sets the maximum number of times a request attempt will be retried before giving up.
Defaults to 4.
pub fn get_max_num_retries(&self) -> u32[src]
Returns the builder's configured maximum number of retries.
pub fn client_qos(&mut self, client_qos: ClientQos) -> &mut Self[src]
Sets the client's internal rate limiting behavior.
Defaults to ClientQos::Enabled.
pub fn get_client_qos(&self) -> ClientQos[src]
Returns the builder's configured internal rate limiting behavior.
pub fn server_qos(&mut self, server_qos: ServerQos) -> &mut Self[src]
Sets the client's behavior in response to a QoS error from the server.
Defaults to ServerQos::AutomaticRetry.
pub fn get_server_qos(&self) -> ServerQos[src]
Returns the builder's configured server QoS behavior.
pub fn service_error(&mut self, service_error: ServiceError) -> &mut Self[src]
Sets the client's behavior in response to a service error from the server.
Defaults to ServiceError::WrapInNewError.
pub fn get_service_error(&self) -> ServiceError[src]
Returns the builder's configured service error handling behavior.
pub fn idempotency(&mut self, idempotency: Idempotency) -> &mut Self[src]
Sets the client's behavior to determine if a request is idempotent or not.
Only idempotent requests will be retried.
Defaults to Idempotency::ByMethod.
pub fn get_idempotency(&self) -> Idempotency[src]
Returns the builder's configured idempotency handling behavior.
pub fn node_selection_strategy(
&mut self,
node_selection_strategy: NodeSelectionStrategy
) -> &mut Self[src]
&mut self,
node_selection_strategy: NodeSelectionStrategy
) -> &mut Self
Sets the client's strategy for selecting a node for a request.
Defaults to NodeSelectionStrategy::PinUntilError.
pub fn get_node_selection_strategy(&self) -> NodeSelectionStrategy[src]
Returns the builder's configured node selection strategy.
pub fn metrics(&mut self, metrics: Arc<MetricRegistry>) -> &mut Self[src]
Sets the metric registry used to register client metrics.
Defaults to no registry.
pub fn get_metrics(&self) -> Option<&Arc<MetricRegistry>>[src]
Returns the builder's configured metric registry.
pub fn host_metrics(
&mut self,
host_metrics: Arc<HostMetricsRegistry>
) -> &mut Self[src]
&mut self,
host_metrics: Arc<HostMetricsRegistry>
) -> &mut Self
Sets the host metrics registry used to track host performance.
Defaults to no registry.
pub fn get_host_metrics(&self) -> Option<&Arc<HostMetricsRegistry>>[src]
Returns the builder's configured host metrics registry.
pub fn rng_seed(&mut self, rng_seed: u64) -> &mut Self[src]
Sets a seed used to initialize the client's random number generators.
Several components of the client rely on entropy. If set, the client will use the seed to initialize its internal random number generators such that clients created with the same configuration will produce the same behavior.
Defaults to no seed.
pub fn get_rng_seed(&self) -> Option<u64>[src]
Returns the builder's configured RNG seed.
pub fn with_raw_client_builder<U>(self, raw_client_builder: U) -> Builder<U>[src]
Sets the raw client builder.
Defaults to DefaultRawClientBuilder.
pub fn get_raw_client_builder(&self) -> &T[src]
Returns the builder's configured raw client builder.
impl<T> Builder<T> where
T: BuildRawClient, [src]
T: BuildRawClient,
pub fn build(&self) -> Result<Client<T::RawClient>, Error>[src]
pub fn build_blocking(&self) -> Result<Client<T::RawClient>, Error>[src]
Trait Implementations
Auto Trait Implementations
impl<T = DefaultRawClientBuilder> !RefUnwindSafe for Builder<T>[src]
impl<T> Send for Builder<T> where
T: Send, [src]
T: Send,
impl<T> Sync for Builder<T> where
T: Sync, [src]
T: Sync,
impl<T> Unpin for Builder<T> where
T: Unpin, [src]
T: Unpin,
impl<T = DefaultRawClientBuilder> !UnwindSafe for Builder<T>[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, 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>,