systemprompt_api/services/server/mod.rs
1//! API server assembly, lifecycle, and readiness.
2//!
3//! [`startup`] binds the TCP listener before bootstrap and serves a starting
4//! health probe; [`builder`] composes the full axum router and global
5//! middleware stack; [`runner`] runs the startup reconciliation, swaps the
6//! full router onto the listener, and awaits shutdown. The readiness
7//! signalling surface ([`is_ready`], [`signal_ready`], [`wait_for_ready`]) is
8//! used by external health probes. Discovery, health, metrics, and route
9//! configuration live in the private submodules.
10//!
11//! Copyright (c) systemprompt.io — Business Source License 1.1.
12//! See <https://systemprompt.io> for licensing details.
13
14pub mod builder;
15mod discovery;
16pub mod health;
17mod health_stats;
18
19pub mod health_detail;
20pub mod lifecycle;
21pub mod metrics;
22mod pool_metrics;
23mod probes;
24pub mod readiness;
25pub mod routes;
26pub mod runner;
27pub mod scheduler_health;
28pub mod shutdown;
29pub mod startup;
30
31pub use builder::*;
32pub use readiness::{
33 ReadinessEvent, get_readiness_receiver, init_readiness, is_ready, signal_ready,
34 signal_shutdown, wait_for_ready,
35};
36pub use runner::*;
37pub use startup::{EarlyServer, bind_and_serve, starting_router};