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
# options set at this level will apply as defaults to all configured services
security:
ca-file: var/security/ca.pem
Implementations§
source§impl 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§
source§impl Clone for ServicesConfig
impl Clone for ServicesConfig
source§fn clone(&self) -> ServicesConfig
fn clone(&self) -> ServicesConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ServicesConfig
impl Debug for ServicesConfig
source§impl Default for ServicesConfig
impl Default for ServicesConfig
source§fn default() -> ServicesConfig
fn default() -> ServicesConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ServicesConfigwhere
ServicesConfig: Default,
impl<'de> Deserialize<'de> for ServicesConfigwhere ServicesConfig: Default,
source§fn 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
source§impl From<ServicesConfig> for ServicesConfigBuilder
impl From<ServicesConfig> for ServicesConfigBuilder
source§fn from(config: ServicesConfig) -> ServicesConfigBuilder
fn from(config: ServicesConfig) -> ServicesConfigBuilder
Converts to this type from the input type.
source§impl PartialEq<ServicesConfig> for ServicesConfig
impl PartialEq<ServicesConfig> for ServicesConfig
source§fn eq(&self, other: &ServicesConfig) -> bool
fn eq(&self, other: &ServicesConfig) -> bool
This method tests for
self and other values to be equal, and is used
by ==.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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more