Expand description
Axum HTTP/HTTPS server setup.
ServerState— shared application state passed through every handler via Axum’sState<Arc<ServerState>>extractor. Holds oneSiteBackendper configured site so a single server can fan out to multiple CSM/OpenCHAMI clusters.start_server— binary entry point. Builds the router (seeroutes::build_router), installs the request-logging middleware, optionally wraps the listener in TLS, and installs a SIGTERM/Ctrl+C handler for graceful shutdown.- Submodules:
handlers— per-resource Axum handlers; converts HTTP requests into service-layer calls.routes— router registration (one entry per/api/v1path).auth_middleware— defensive middleware applied to/api/v1/auth/*(per-IP rate limit + body redaction).common— server-only helpers (per-requestInfraContext, Kafka audit producer, JWT claim extractors, Vault client).api_doc— utoipa OpenAPI document served atGET /openapi.json+GET /docs.
Modules§
- api_doc
- OpenAPI specification document for the manta HTTP server.
- auth_
middleware - Defensive middleware for the
/api/v1/auth/*sub-router. - common
- Helpers used only by the manta HTTP server (handlers + service layer).
- handlers
- Top-level Axum handlers module.
- routes
- Axum router registration: maps every
/api/v1/path to its handler.
Structs§
- Server
State - Shared state for all HTTP handlers.
- Site
Backend - All per-site connection data the server needs to talk to backend APIs.
Functions§
- start_
server - Start the HTTP or HTTPS server.