pub struct ManagerConfig {
pub default_config: CircuitBreakerConfig,
pub node_overrides: Vec<NodeOverride>,
pub metrics_enabled: bool,
pub auto_create: bool,
}Expand description
Configuration for the circuit breaker manager
Fields§
§default_config: CircuitBreakerConfigGlobal default configuration
node_overrides: Vec<NodeOverride>Per-node configuration overrides
metrics_enabled: boolEnable manager-level metrics collection
auto_create: boolAuto-create breakers for unknown nodes
Implementations§
Source§impl ManagerConfig
impl ManagerConfig
Sourcepub fn new(default_config: CircuitBreakerConfig) -> Self
pub fn new(default_config: CircuitBreakerConfig) -> Self
Create a new manager config
Sourcepub fn with_node_override(self, override_: NodeOverride) -> Self
pub fn with_node_override(self, override_: NodeOverride) -> Self
Add a node override
Sourcepub fn with_metrics(self, enabled: bool) -> Self
pub fn with_metrics(self, enabled: bool) -> Self
Enable or disable metrics
Sourcepub fn get_node_config(&self, node_id: &str) -> CircuitBreakerConfig
pub fn get_node_config(&self, node_id: &str) -> CircuitBreakerConfig
Get effective config for a node
Trait Implementations§
Source§impl Clone for ManagerConfig
impl Clone for ManagerConfig
Source§fn clone(&self) -> ManagerConfig
fn clone(&self) -> ManagerConfig
Returns a duplicate 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 ManagerConfig
impl Debug for ManagerConfig
Auto Trait Implementations§
impl Freeze for ManagerConfig
impl RefUnwindSafe for ManagerConfig
impl Send for ManagerConfig
impl Sync for ManagerConfig
impl Unpin for ManagerConfig
impl UnsafeUnpin for ManagerConfig
impl UnwindSafe for ManagerConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more