corvix.web.health¶
Health endpoints and their supporting helpers.
Serves GET /api/v1/health (the versioned health check) and GET
/api/health (an unversioned, always-public alias kept so container health
checks — docker-compose, e2e, Lighthouse — need not track the API version).
Attributes¶
Functions¶
|
|
|
|
Resolve the poller status for the health check, or a failure payload. |
|
|
Compute and return the health check response. |
|
Health endpoint for container checks. |
|
Unversioned health alias for container healthchecks; see |
Module Contents¶
- corvix.web.health._health_error(poller_status: corvix.domain.PollerStatus) dict[str, object][source][source]¶
- corvix.web.health._read_health_poller_status() corvix.domain.PollerStatus | dict[str, object][source][source]¶
Resolve the poller status for the health check, or a failure payload.
- corvix.web.health._health_impl() litestar.Response[dict[str, object]][source][source]¶
Compute and return the health check response.
Both health endpoints are always public (issue #131), even when
CORVIX_SECRET_TOKENis set, so the response body is trimmed to a bare{"status": ...}— noreason,detail, or other internals that could leak service state to an unauthenticated caller. The full detail (poller_status.last_error, per-account errors, …) remains available to authenticated clients via/api/v1/snapshot.
- corvix.web.health.health() litestar.Response[dict[str, object]][source][source]¶
Health endpoint for container checks.
Returns 200 with {“status”: “ok”} when config and storage are readable, the poller is running, and the poller’s last poll time is not stale. Returns 503 with {“status”: “unhealthy”} otherwise.
This endpoint is always public, so the response carries no further detail; see the authenticated
/api/v1/snapshotendpoint for poller error detail.