Skip to main content

soma_http_server/
lib.rs

1//! Reusable Axum server plumbing (plan section 3.12).
2//!
3//! `soma-http-api` (plan section 3.11) owns reusable *API surface* shapes —
4//! response envelopes, error/problem-details bodies, probe DTOs, route
5//! inventory metadata. This crate owns the layer below that: generic
6//! *transport lifecycle* mechanics — listener binding, the Axum server run
7//! loop, graceful shutdown, request-ID/tracing/timeout/body-limit
8//! middleware, generic CORS configuration, generic health-check routing,
9//! and a generic not-found/method-not-allowed rejection envelope.
10//!
11//! This crate must stay product-agnostic: no `/v1/*` Soma routes, no Soma
12//! action names, no product auth policy, no Soma OpenAPI document content,
13//! no embedded Soma UI assets, no action dispatch. Product routers compose
14//! themselves out of these primitives; they do not belong here.
15
16pub mod health;
17pub mod middleware;
18pub mod rejection;
19pub mod server;
20pub mod shutdown;
21
22pub use server::{bind, serve, serve_with_shutdown, ServerError};
23pub use shutdown::shutdown_signal;