diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..21e3e05 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). + +## [Unreleased] + +### Added + +- `/health` endpoint to the `nulld` daemon returning HTTP 200 with `{"status": "ok"}` for Docker/Kubernetes readiness probes. diff --git a/crates/nulld/src/main.rs b/crates/nulld/src/main.rs index 64ae8cd..8fba5bb 100644 --- a/crates/nulld/src/main.rs +++ b/crates/nulld/src/main.rs @@ -137,6 +137,7 @@ async fn main() -> Result<(), Box> { let state = Arc::new(global_state); let app = Router::new() + .route("/health", get(handle_health)) .route("/inject", post(handle_inject)) .route("/recall", get(handle_recall)) .route("/snapshot", post(handle_snapshot)) @@ -154,6 +155,15 @@ async fn main() -> Result<(), Box> { Ok(()) } +async fn handle_health() -> impl IntoResponse { + ( + StatusCode::OK, + Json(SimpleResponse { + status: "ok".to_string(), + }), + ) +} + async fn get_or_load_thread( state: &SharedState, thread_id: &str,