Expand description
RFC 8458 health check response types.
Implements the IETF Health Check Response Format for HTTP APIs (draft-inadarei-api-health-check).
§Wire format
Content-Type: application/health+json
§Liveness (GET /health)
{"status": "pass", "version": "1.0.0", "serviceId": "my-service"}§Readiness (GET /health/ready)
{
"status": "pass",
"version": "1.0.0",
"serviceId": "my-service",
"checks": {
"postgres:connection": [{"componentType": "datastore", "status": "pass"}]
}
}§HTTP status codes
LivenessResponse→ always200 OKReadinessResponse→200 OKonpass/warn,503 Service Unavailableonfail
Structs§
- Health
Check - Individual component check result (RFC 8458 §4).
- Health
Check Builder - Typestate builder for
HealthCheck. - Liveness
Response - Liveness probe response (
GET /health) — RFC 8458. - Readiness
Response - Readiness/startup probe response (
GET /health/ready,GET /health/startup) — RFC 8458. - Readiness
Response Builder - Typestate builder for
ReadinessResponse.
Enums§
- Health
Status - RFC 8458 §3 health check status.