Struct conjure_runtime::ClientFactory [−][src]
pub struct ClientFactory { /* fields omitted */ }Expand description
A factory type which can create clients that will live-reload in response to configuration updates.
Implementations
Creates a new client factory based off of a refreshable ServicesConfig.
Sets the user agent sent by clients.
Required.
Returns the configured user agent.
Sets clients’ rate limiting behavior.
Defaults to ClientQos::Enabled.
Returns the configured rate limiting behavior
Sets clients’ behavior in response to a QoS error from the server.
Defaults to ServerQos::AutomaticRetry.
Returns the configured QoS behavior.
Sets clients’ behavior in response to a service error from the server.
Defaults to ServiceError::WrapInNewError.
Returns the configured service error behavior.
Sets clients’ behavior to determine if a request is idempotent or not.
Only idempotent requests will be retried.
Defaults to Idempotency::ByMethod.
Returns the configured idempotency behavior.
pub fn node_selection_strategy(
&mut self,
node_selection_strategy: NodeSelectionStrategy
) -> &mut Self
pub fn node_selection_strategy(
&mut self,
node_selection_strategy: NodeSelectionStrategy
) -> &mut Self
Sets the clients’ strategy for selecting a node for a request.
Defaults to NodeSelectionStrategy::PinUntilError.
Returns the configured node selection strategy.
Sets the metric registry used to register client metrics.
Defaults to no registry.
Returns the configured metrics registry.
Sets the host metrics registry used to track host performance.
Defaults to no registry.
Returns the configured host metrics registry.
Returns the Handle to the tokio Runtime to be used by blocking clients.
This has no effect on async clients.
Defaults to a conjure-runtime internal Runtime.
Returns the configured blocking handle.
Creates a new client for the specified service.
The client’s configuration will automatically refresh to track changes in the factory’s ServicesConfig.
If no configuration is present for the specified service in the ServicesConfig, the client will
immediately return an error for all requests.
Panics
Panics if user_agent is not set.
Creates a new blocking client for the specified service.
The client’s configuration will automatically refresh to track changes in the factory’s ServicesConfig.
If no configuration is present for the specified service in the ServicesConfig, the client will
immediately return an error for all requests.
Panics
Panics if user_agent is not set.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ClientFactory
impl Send for ClientFactory
impl Sync for ClientFactory
impl Unpin for ClientFactory
impl !UnwindSafe for ClientFactory
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more