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}
19mod health_detail;
20mod lifecycle;
21pub mod metrics;
22pub mod readiness;
23mod routes;
24pub mod runner;
25pub mod scheduler_health;
26mod shutdown;
27
28pub use builder::*;
29pub use readiness::{
30    ReadinessEvent, get_readiness_receiver, init_readiness, is_ready, signal_ready,
31    signal_shutdown, wait_for_ready,
32};
33pub use runner::*;