tailrace-console 1.0.0

Management console: single-binary axum server embedding the web SPA, REST API, Swagger UI and node registration/heartbeat endpoints
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! `GET /healthz` — liveness probe (topology §3.2: console serves it at :8080).

use axum::http::StatusCode;
use axum::response::{IntoResponse, Response};
use serde_json::json;

#[utoipa::path(
    get,
    path = "/healthz",
    responses((status = 200, description = "console is alive", body = Object))
)]
pub async fn healthz() -> Response {
    (StatusCode::OK, axum::Json(json!({ "status": "ok" }))).into_response()
}