Skip to main content

Module http

Module http 

Source
Expand description

HTTP transport. Implements the vgi-rpc protocol over HTTP: POST /{method} unary POST /{method}/init stream init (producer or exchange) POST /{method}/exchange stream continuation

Streaming is stateless on the wire: the full StreamStateKind is sealed into an XChaCha20-Poly1305 AEAD token (v4 wire format) carried in the vgi_rpc.stream_state#b64 metadata key. Any worker with the same token key can resume any continuation request — no server-side session map, no reaper, no cross-worker affinity. The token contents are confidential as well as authenticated: only the server can read the serialized state.

Structs§

HttpState
HTTP server state shared across all handlers.
HttpStateBuilder
Fluent builder for HttpState.

Constants§

ARROW_CONTENT_TYPE

Functions§

build_router
serve_with_shutdown
Serve state on listener, terminating cleanly on SIGTERM/SIGINT. Convenience wrapper around build_router + [axum::serve] + shutdown_signal.
shutdown_signal
A future that resolves when the process receives SIGTERM or SIGINT (or a Ctrl-C event on non-Unix). Pass to [axum::serve]’s with_graceful_shutdown to stop accepting new connections, drain in-flight requests, and exit cleanly.