Expand description
HTTP client and server runtime owned by the network boundary.
This module owns validated HTTP configuration, outbound JSON client policy, the bounded raw JSON POST helper, async Axum router serving, request body limits, per-request timeouts, graceful shutdown, and QoS-gated listener admission. Higher layers should use these APIs instead of constructing sockets, listeners, HTTP clients, or HTTP server loops directly.
Structs§
- Http
Bind Address - Validated HTTP bind address in
host:portform. - Http
Config - Event-driven HTTP configuration for inbound and outbound adapters.
- Http
Connection Id - Stable identifier assigned to an accepted HTTP connection.
- Http
Proxy Config - Outbound HTTP proxy and TLS verification policy.
- Outbound
Client Error - QosHttp
Response - Reqwest response that keeps the QoS request permit until the body is consumed.
Enums§
- Http
Client Error - Error raised by bounded outbound JSON HTTP calls.
- Http
Config Error - HTTP configuration validation error.
- Http
Serve Error - Error raised while serving an event-driven HTTP adapter.
- QosHttp
Client Error - Error raised by QoS-gated outbound reqwest calls.
Constants§
- DEFAULT_
HTTP_ BIND - DEFAULT_
MAX_ BODY_ BYTES - DEFAULT_
REQUEST_ TIMEOUT - DEFAULT_
SHUTDOWN_ TIMEOUT - DEFAULT_
SSL_ VERIFY
Functions§
- outbound_
json_ client - Builds an async outbound JSON client from validated network policy.
- outbound_
json_ client_ with_ policy - Builds an async outbound JSON client with request-scoped transport policy.
- post_
json - Posts a JSON payload through the network boundary using the configured timeout.
- post_
json_ with_ qos - Posts JSON through the raw worker HTTP helper after outbound QoS admission.
- remote_
clients_ allowed - Returns whether a listener may accept non-local clients under the access policy.
- router_
with_ qos_ request_ admission - Adds per-request QoS admission to an Axum router without opening sockets.
- send_
request_ with_ qos - Sends an outbound reqwest request after acquiring a QoS request permit.
- serve_
router - Starts an async HTTP server with graceful shutdown under the network boundary.
- serve_
router_ with_ qos - Starts an async HTTP server whose accepted connections consume QoS permits.