Skip to main content

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