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 probes;
23pub mod readiness;
24pub mod routes;
25pub mod runner;
26pub mod scheduler_health;
27pub mod shutdown;
28pub mod startup;
29
30pub use builder::*;
31pub use readiness::{
32 ReadinessEvent, get_readiness_receiver, init_readiness, is_ready, signal_ready,
33 signal_shutdown, wait_for_ready,
34};
35pub use runner::*;
36pub use startup::{EarlyServer, bind_and_serve, starting_router};