pub struct HealthChecker { /* private fields */ }Expand description
Health checker
Implementations§
Source§impl HealthChecker
impl HealthChecker
Sourcepub fn new(config: HealthCheckConfig) -> Self
pub fn new(config: HealthCheckConfig) -> Self
Create new health checker
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Create with default config
Sourcepub fn liveness(&self) -> HealthResponse
pub fn liveness(&self) -> HealthResponse
Liveness check - is the process alive? This should almost always return healthy unless the process is stuck
Sourcepub fn readiness(&self, metrics: &HealthMetrics) -> HealthResponse
pub fn readiness(&self, metrics: &HealthMetrics) -> HealthResponse
Readiness check - can we accept traffic?
Auto Trait Implementations§
impl Freeze for HealthChecker
impl RefUnwindSafe for HealthChecker
impl Send for HealthChecker
impl Sync for HealthChecker
impl Unpin for HealthChecker
impl UnwindSafe for HealthChecker
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