Expand description
Reusable liveness/readiness probe DTOs and response helpers.
Products wire these into their own /health and /readyz handlers,
supplying whatever async check represents “ready” for them.
Structs§
Enums§
- Liveness
Status - The one liveness value this crate emits. An enum (rather than a bare
&'static str) so a second construction site can’t drift to an unintended value — mirrorsReadinessStatusbelow. - Readiness
Status - The two readiness values this crate emits. An enum (rather than a bare
&'static str) so callers can’t construct a third, unintended status value that this module’s response builders never produce.
Functions§
- liveness_
response 200 OKliveness response — “the process is up”.- readiness_
response - Readiness response from a dependency check:
200 OKwith{"status": "ready"}on success,503 Service Unavailablewith the failure reason on error. Unlike liveness, readiness probes an upstream dependency so orchestrators only route traffic once the service can actually serve it.