Skip to main content

Module callback_server

Module callback_server 

Source
Expand description

The host-side HTTP server of the two callback protocols (spec 042, 3.10 and 3.11): hosts any ContextSource behind POST /rustev/remote-context/1/{describe,fetch,cancel,invalidations} and any EvidenceSink behind POST /rustev/remote-sink/1/{describe,deliver}.

A context fetch runs an attempt id at most once inside the idempotency window: a repeat with identical content gets the recorded answer, and with other content malformed_request (attempt_id_conflict). A delivery with a decision id seen inside the deduplication window is duplicate for the same digest and conflict for another. Every table is bounded; a full one with nothing expired refuses with 503. A receipt or a snapshot is evidence, never authorization.

A source hosted with CallbackServer::host_acquisition is described with its spec 036 descriptor and serves POST /rustev/remote-context/1/acquire under the same attempt rules; the page bytes the hosted AcquisitionSource returns are sent unchanged.

Structs§

CallbackConfig
Server-wide terms and bounds of the context protocol.
CallbackHandle
A running accept loop; dropping it stops accepting.
CallbackServer
The server. Clones share state.
HostedContext
One hosted context source and the fields it declares.
HostedSink
The hosted evidence sink and what it declares.

Constants§

CONTEXT_ACQUIRE_PATH
CONTEXT_CANCEL_PATH
CONTEXT_DESCRIBE_PATH
CONTEXT_FETCH_PATH
CONTEXT_INVALIDATIONS_PATH
SINK_DELIVER_PATH
SINK_DESCRIBE_PATH