Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions crates/nulld/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
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))
Expand All @@ -154,6 +155,15 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
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,
Expand Down
Loading