add /health/live and /health/ready hive-wide health endpoints

This commit is contained in:
damocles 2026-07-31 19:30:29 +02:00 committed by mara
commit b39bf67cb3
3 changed files with 140 additions and 10 deletions

View file

@ -24,6 +24,7 @@ mod extra_forges;
// same type used to build agent paths. Re-exported so submodules + the socket
// server reach it as `crate::dashboard::Ident`.
pub(crate) use hive_types::Ident;
mod health;
mod infra_containers;
mod journal;
mod lifecycle_ops;
@ -79,6 +80,8 @@ pub async fn serve(
// API-only: the gateway static-serves the dashboard dist and proxies
// non-static requests here (see hive-gateway.nix). Unmatched paths 404.
let app = Router::new()
.route("/health/live", get(health::get_health_live))
.route("/health/ready", get(health::get_health_ready))
.route("/api/state", get(state_snapshot::api_state))
.route("/api/journal/{name}", get(journal::get_journal))
.route("/api/journal-host", get(journal::get_journal_host))