Skip to main content

Crate pleme_health

Crate pleme_health 

Source
Expand description

Pleme Health - Health check patterns for Nexus platform services

This library provides standardized health check patterns for:

  • Kubernetes liveness and readiness probes
  • Composable health check builders
  • Built-in checks for PostgreSQL, Redis, HTTP endpoints
  • Axum integration helpers

§Example

use pleme_health::{HealthCheckBuilder, postgres_check, redis_check};
use axum::Router;
use sqlx::PgPool;

// Build health checks
let health = HealthCheckBuilder::new("my-service", "1.0.0")
    .add_check("database", postgres_check(pool.clone()))
    .add_check("cache", redis_check(redis_url))
    .build();

// Add to Axum router
let app = Router::new()
    .merge(health.routes());

Re-exports§

pub use builder::HealthCheckBuilder;
pub use response::HealthResponse;
pub use response::CheckStatus;
pub use checks::postgres_check;
pub use checks::redis_check;
pub use checks::http_check;
pub use routes::health_routes;

Modules§

builder
Health check builder for composable health checks
checks
Built-in health checks for common dependencies
response
Health check response types
routes
Axum route integration for health checks