Expand description
Health check system for monitoring application health
This module provides a flexible health check system for monitoring the health and readiness of your application and its dependencies.
§Example
use rustapi_core::health::{HealthCheck, HealthCheckBuilder, HealthStatus};
#[tokio::main]
async fn main() {
let health = HealthCheckBuilder::new(true)
.add_check("database", || async {
// Check database connection
HealthStatus::healthy()
})
.add_check("redis", || async {
// Check Redis connection
HealthStatus::healthy()
})
.build();
// Use health.execute().await to get results
}Structs§
- Health
Check - Health check configuration
- Health
Check Builder - Builder for health check configuration
- Health
Check Result - Overall health check result
Enums§
- Health
Status - Health status of a component
Type Aliases§
- Health
Check Fn - Type alias for async health check functions