| 12345678910111213141516171819202122 |
- //! Liveness probe: `GET /healthz`.
- //!
- //! Dependency-free so it can prove the process is up even when the OAuth
- //! backends are not configured yet. The readiness check that touches the
- //! session/http-client resources is added in Wave 3.
- use axum::Json;
- use axum::http::StatusCode;
- use axum::response::IntoResponse;
- use serde::Serialize;
- /// JSON body returned by [`healthz`].
- #[derive(Debug, Serialize)]
- pub struct HealthBody {
- /// Liveness marker; always `"ok"` on a served response.
- pub status: &'static str,
- }
- /// `GET /healthz` -> `200 OK` with `{"status":"ok"}`.
- pub async fn healthz() -> impl IntoResponse {
- (StatusCode::OK, Json(HealthBody { status: "ok" }))
- }
|