Skip to main content

Module fetcher

Module fetcher 

Source
Expand description

Coalesced, failover federation fetch of raw event bytes.

Service::fetch is the entry point; behind it a single worker task owns every in-flight fetch and the dedup map, so no lock guards them. The per-fetch work splits across the submodules: candidate selection, the federation transport, and response validation.

Modulesยง

error ๐Ÿ”’
Internal failure reporting for federation fetches.
inflight ๐Ÿ”’
Single-flight bookkeeping for one in-flight fetch.
opts ๐Ÿ”’
Caller contract and result types for a fetch: Opts in, Outcome out.
select ๐Ÿ”’
Candidate server selection for a fetch.
transport ๐Ÿ”’
Federation transport: an Op and target server in, raw response bytes out.
validate ๐Ÿ”’
Two-tier response validation for fetched federation data.
worker ๐Ÿ”’
The fetch worker loop: one task owning every in-flight fetch, lock-free.

Structsยง

Msg ๐Ÿ”’
Request to the worker. The worker replies with a subscription to the coalesced result, deferring the reply under backpressure until a slot frees.
Opts
Re-exports the fetch request contract, operation types, and response value.
Outcome
Re-exports the fetch request contract, operation types, and response value.
Service
Coordinates coalesced, validated federation fetches with candidate failover.

Enumsยง

FanoutGrowth
Re-exports the fetch request contract, operation types, and response value.
Op
Re-exports the fetch request contract, operation types, and response value.

Constantsยง

REQUESTS_MAX ๐Ÿ”’
Upper bound on concurrent in-flight fetches across all keys.

Functionsยง

await_result ๐Ÿ”’

Type Aliasesยง

EventWindow
Re-exports the fetch request contract, operation types, and response value.