Skip to main content

HealthCheck

Trait HealthCheck 

Source
pub trait HealthCheck {
    // Required method
    fn check_health(&self) -> HealthCheckResult;

    // Provided methods
    fn is_alive(&self) -> bool { ... }
    fn is_ready(&self) -> bool { ... }
}
Expand description

Health check trait for components

Required Methods§

Source

fn check_health(&self) -> HealthCheckResult

Perform a health check

Provided Methods§

Source

fn is_alive(&self) -> bool

Check if component is alive (liveness)

Source

fn is_ready(&self) -> bool

Check if component is ready (readiness)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§