pub struct FetchContext {
pub http: Arc<HttpClient>,
pub rate_limiter: Arc<RateLimiter>,
pub log: Arc<ProvenanceLog>,
pub session_id: String,
}Expand description
Per-fetch context shared by all Source impls.
Held by the orchestrator (CLI / MCP server) and passed by reference into
each Source::fetch. Sources MUST NOT construct their own
HttpClient / RateLimiter / ProvenanceLog — they go through
this context for uniform politeness, redirect allowlisting, and audit
logging.
Fields§
§http: Arc<HttpClient>Shared, allowlist-aware HTTP client. See HttpClient.
rate_limiter: Arc<RateLimiter>Process-wide async rate limiter. See RateLimiter.
log: Arc<ProvenanceLog>Append-only, hash-chained provenance log. Source impls MUST emit
one LogEvent::Fetch row per attempt via log.append. See
ProvenanceLog.
session_id: String26-char ULID identifying this process invocation. Mirrors the
session_id stamped into every provenance row by the writer; held
here so source impls can include it in their own structured logs
without re-reading the env.
Trait Implementations§
Source§impl Clone for FetchContext
impl Clone for FetchContext
Source§fn clone(&self) -> FetchContext
fn clone(&self) -> FetchContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more