pub struct CascadingConfig {
pub enabled: bool,
pub max_chain_depth: u32,
pub error_rate_threshold: f64,
pub window_secs: u64,
pub min_window_events: u32,
pub break_duration_secs: u64,
}Expand description
Configuration for cascading failure circuit breakers.
Fields§
§enabled: boolWhether cascading failure protection is enabled. Default: true
max_chain_depth: u32Maximum allowed chain depth for multi-hop tool calls. Requests exceeding this depth are denied. Default: 10
error_rate_threshold: f64Error rate threshold (0.0–1.0) that triggers pipeline circuit breaking. When the error rate within the window exceeds this, the pipeline is broken. Default: 0.5
window_secs: u64Sliding window size in seconds for error rate calculation. Default: 300 (5 minutes)
min_window_events: u32Minimum number of events in the window before error rate is actionable. Prevents false positives from small sample sizes. Default: 10
break_duration_secs: u64Duration in seconds a pipeline stays broken before allowing probes. Default: 60
Implementations§
Source§impl CascadingConfig
impl CascadingConfig
Sourcepub fn validate(&self) -> Result<(), CascadingError>
pub fn validate(&self) -> Result<(), CascadingError>
Validate configuration values.
Trait Implementations§
Source§impl Clone for CascadingConfig
impl Clone for CascadingConfig
Source§fn clone(&self) -> CascadingConfig
fn clone(&self) -> CascadingConfig
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 CascadingConfig
impl Debug for CascadingConfig
Source§impl Default for CascadingConfig
impl Default for CascadingConfig
Source§impl<'de> Deserialize<'de> for CascadingConfig
impl<'de> Deserialize<'de> for CascadingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CascadingConfig
impl RefUnwindSafe for CascadingConfig
impl Send for CascadingConfig
impl Sync for CascadingConfig
impl Unpin for CascadingConfig
impl UnsafeUnpin for CascadingConfig
impl UnwindSafe for CascadingConfig
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