Skip to main content

Module handlers

Module handlers 

Source
Expand description

Axum handlers for the two public endpoints.

Both handlers are async, but every one of them delegates the actual SQLite work to AppState::with_connection which runs on Tokio’s blocking-task pool. The handlers themselves do parsing, parameter validation, and response shaping — nothing else.

Structs§

QueryParams
Query-string parameters accepted by GET /query.
StatsResponse
Wire shape for GET /stats responses.

Functions§

query_handler
GET /query?q=<expr>&limit=<n>
stats_handler
GET /stats