pub struct HealthCheckConfig {
pub interval: Duration,
pub timeout: Duration,
pub failure_threshold: u32,
pub success_threshold: u32,
}Expand description
Health check configuration.
Fields§
§interval: DurationCheck interval.
timeout: DurationTimeout for health checks.
failure_threshold: u32Number of failures before unhealthy.
success_threshold: u32Number of successes before healthy.
Implementations§
Source§impl HealthCheckConfig
impl HealthCheckConfig
Sourcepub const fn with_interval(self, interval: Duration) -> Self
pub const fn with_interval(self, interval: Duration) -> Self
Set interval.
Sourcepub const fn with_timeout(self, timeout: Duration) -> Self
pub const fn with_timeout(self, timeout: Duration) -> Self
Set timeout.
Sourcepub const fn with_failure_threshold(self, threshold: u32) -> Self
pub const fn with_failure_threshold(self, threshold: u32) -> Self
Set failure threshold.
Sourcepub const fn with_success_threshold(self, threshold: u32) -> Self
pub const fn with_success_threshold(self, threshold: u32) -> Self
Set success threshold.
Trait Implementations§
Source§impl Clone for HealthCheckConfig
impl Clone for HealthCheckConfig
Source§fn clone(&self) -> HealthCheckConfig
fn clone(&self) -> HealthCheckConfig
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 HealthCheckConfig
impl Debug for HealthCheckConfig
Auto Trait Implementations§
impl Freeze for HealthCheckConfig
impl RefUnwindSafe for HealthCheckConfig
impl Send for HealthCheckConfig
impl Sync for HealthCheckConfig
impl Unpin for HealthCheckConfig
impl UnwindSafe for HealthCheckConfig
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