Module Kube.HealthSource

Thread-safe liveness and readiness check registry.

Sourcetype t
Sourcetype failure = {
  1. check : string;
  2. message : string;
}
Sourceval create : unit -> t
Sourceval add_liveness : t -> name:string -> (unit -> (unit, string) result) -> unit -> unit
Sourceval add_readiness : t -> name:string -> (unit -> (unit, string) result) -> unit -> unit

Register a named check and return an idempotent removal function. Duplicate names are rejected. Check exceptions become failures rather than escaping.

Sourceval liveness : t -> (unit, failure list) result
Sourceval readiness : t -> (unit, failure list) result
Sourceval pp_failures : Format.formatter -> failure list -> unit