Skip to main content

systemprompt_api/services/server/
mod.rs

1//! API server assembly, lifecycle, and readiness.
2//!
3//! Builds the axum router and global middleware stack ([`builder`]), runs the
4//! startup reconciliation and serving loop ([`runner`]), and exposes the
5//! readiness signalling surface ([`is_ready`], [`signal_ready`],
6//! [`wait_for_ready`]) used by external health probes. Discovery, health,
7//! metrics, and route configuration live in the private submodules.
8
9pub mod builder;
10mod discovery;
11mod health;
12
13#[cfg(feature = "test-api")]
14pub mod test_api {
15    #[cfg(target_os = "linux")]
16    pub use super::health::parse_proc_status_kb;
17    pub use super::health::{audit_log_stats, database_stats, human_bytes, table_stats};
18    pub use super::health_detail::handle_health_detail;
19}
20mod health_detail;
21mod lifecycle;
22pub mod metrics;
23pub mod readiness;
24mod routes;
25pub mod runner;
26pub mod scheduler_health;
27mod shutdown;
28
29#[cfg(feature = "test-api")]
30pub use lifecycle::reconciliation_test_api;
31#[cfg(feature = "test-api")]
32pub use shutdown::test_api as shutdown_test_api;
33
34pub use builder::*;
35pub use readiness::{
36    ReadinessEvent, get_readiness_receiver, init_readiness, is_ready, signal_ready,
37    signal_shutdown, wait_for_ready,
38};
39pub use runner::*;