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§
- Http
State - HTTP server state shared across all handlers.
- Http
State Builder - Fluent builder for
HttpState.
Constants§
Functions§
- build_
router - serve_
with_ shutdown - Serve
stateonlistener, terminating cleanly on SIGTERM/SIGINT. Convenience wrapper aroundbuild_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]’swith_graceful_shutdownto stop accepting new connections, drain in-flight requests, and exit cleanly.