Skip to main content

Module registry

Module registry 

Source
Expand description

Global health registry for unified service health state.

Modules register health check callbacks at construction. The registry aggregates component status to determine overall service health.

§Design

  • Global singleton via OnceLock (consistent with config registry pattern)
  • Components register a closure that returns their current HealthStatus
  • is_healthy requires ALL components healthy
  • is_ready requires NO components unhealthy (degraded is acceptable for readiness)
  • Empty registry is considered healthy (vacuously true)

Structs§

HealthRegistry
Global health registry singleton.

Enums§

HealthStatus
Health status of a registered component.