Module health

Module health 

Source
Expand description

§Health Check Module

Comprehensive health checks for production deployments including:

  • Liveness Probe: Is the process running?
  • Readiness Probe: Is the service ready to accept traffic?
  • Startup Probe: Has initial startup completed?

§Usage

use axum::Router;
use guts_node::health::{health_routes, HealthState};

let health_state = HealthState::new();
health_state.set_ready(true);

let app: Router<()> = Router::new()
    .merge(health_routes(health_state));

Structs§

ComponentHealth
Individual component health.
HealthResponse
Overall health response.
HealthState
Health state for tracking component health.
LivenessResponse
Liveness probe response.
ReadinessChecks
Readiness component checks.
ReadinessResponse
Readiness probe response.
StartupResponse
Startup probe response.

Enums§

HealthStatus
Health status values.

Functions§

health_routes
Create health check routes.