pub struct HealthConfig {
pub decay_half_life_seconds: f64,
pub penalty_429: f32,
pub penalty_403: f32,
pub penalty_5xx: f32,
pub penalty_timeout: f32,
pub boost_success: f32,
pub cooldown_trigger_count: u32,
pub cooldown_multiplier: f64,
pub max_cooldown_seconds: u64,
}Expand description
Health engine configuration.
Fields§
§decay_half_life_seconds: f64Half-life for EWMA decay in seconds. Older observations matter less.
penalty_429: f32Penalty applied to health score on a 429 response.
penalty_403: f32Penalty applied to health score on a 403 response.
penalty_5xx: f32Penalty applied to health score on a 5xx response.
penalty_timeout: f32Penalty applied to health score on a timeout.
boost_success: f32Boost applied on successful response.
cooldown_trigger_count: u32Number of consecutive failures before triggering cooldown.
cooldown_multiplier: f64Multiplier for exponential cooldown growth.
max_cooldown_seconds: u64Maximum cooldown duration in seconds.
Trait Implementations§
Source§impl Clone for HealthConfig
impl Clone for HealthConfig
Source§fn clone(&self) -> HealthConfig
fn clone(&self) -> HealthConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HealthConfig
impl Debug for HealthConfig
Source§impl Default for HealthConfig
impl Default for HealthConfig
Source§impl<'de> Deserialize<'de> for HealthConfig
impl<'de> Deserialize<'de> for HealthConfig
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 HealthConfig
impl RefUnwindSafe for HealthConfig
impl Send for HealthConfig
impl Sync for HealthConfig
impl Unpin for HealthConfig
impl UnsafeUnpin for HealthConfig
impl UnwindSafe for HealthConfig
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