Struct conjure_runtime::config::ServicesConfig
source · [−]pub struct ServicesConfig { /* private fields */ }Expand description
Configuration for a collection of services.
This type can be constructed programmatically via the ServicesConfigBuilder API or deserialized from e.g. a
configuration file. Default values for various configuration options can be set at the top level in addition to
being specified per-service.
Examples
services:
auth-service:
uris:
- https://auth.my-network.com:1234/auth-service
cache-service:
uris:
- https://cache-1.my-network.com/cache-service
- https://cache-2.my-network.com/cache-service
request-timeout: 10s
security:
ca-file: var/security/ca.pemImplementations
sourceimpl ServicesConfig
impl ServicesConfig
sourcepub fn builder() -> ServicesConfigBuilder
pub fn builder() -> ServicesConfigBuilder
Returns a new builder.
sourcepub fn merged_service(&self, name: &str) -> Option<ServiceConfig>
pub fn merged_service(&self, name: &str) -> Option<ServiceConfig>
Returns the configuration for the specified service with top-level defaults applied.
sourcepub fn security(&self) -> Option<&SecurityConfig>
pub fn security(&self) -> Option<&SecurityConfig>
Returns the security configuration.
sourcepub fn proxy(&self) -> Option<&ProxyConfig>
pub fn proxy(&self) -> Option<&ProxyConfig>
Returns the proxy configuration.
sourcepub fn connect_timeout(&self) -> Option<Duration>
pub fn connect_timeout(&self) -> Option<Duration>
Returns the connection timeout.
sourcepub fn read_timeout(&self) -> Option<Duration>
pub fn read_timeout(&self) -> Option<Duration>
Returns the read timeout.
sourcepub fn write_timeout(&self) -> Option<Duration>
pub fn write_timeout(&self) -> Option<Duration>
Returns the write timeout.
sourcepub fn backoff_slot_size(&self) -> Option<Duration>
pub fn backoff_slot_size(&self) -> Option<Duration>
Returns the backoff slot size.
Trait Implementations
sourceimpl Clone for ServicesConfig
impl Clone for ServicesConfig
sourcefn clone(&self) -> ServicesConfig
fn clone(&self) -> ServicesConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ServicesConfig
impl Debug for ServicesConfig
sourceimpl Default for ServicesConfig
impl Default for ServicesConfig
sourcefn default() -> ServicesConfig
fn default() -> ServicesConfig
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ServicesConfigwhere
ServicesConfig: Default,
impl<'de> Deserialize<'de> for ServicesConfigwhere
ServicesConfig: Default,
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<ServicesConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ServicesConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<ServicesConfig> for ServicesConfigBuilder
impl From<ServicesConfig> for ServicesConfigBuilder
sourcefn from(config: ServicesConfig) -> ServicesConfigBuilder
fn from(config: ServicesConfig) -> ServicesConfigBuilder
Converts to this type from the input type.
sourceimpl PartialEq<ServicesConfig> for ServicesConfig
impl PartialEq<ServicesConfig> for ServicesConfig
sourcefn eq(&self, other: &ServicesConfig) -> bool
fn eq(&self, other: &ServicesConfig) -> bool
impl StructuralPartialEq for ServicesConfig
Auto Trait Implementations
impl RefUnwindSafe for ServicesConfig
impl Send for ServicesConfig
impl Sync for ServicesConfig
impl Unpin for ServicesConfig
impl UnwindSafe for ServicesConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more