pub struct EggfetchConfig {
pub user_agent: String,
pub connect_timeout: Duration,
pub total_timeout: Duration,
pub max_redirects: usize,
pub proxy: ProxyDecision,
}Expand description
Strict transport configuration. All policy lives here.
Fields§
§user_agent: StringUser agent header.
connect_timeout: DurationConnect deadline.
total_timeout: DurationTotal deadline.
max_redirects: usizeRedirect bound.
proxy: ProxyDecisionProxy routing decision.
Implementations§
Source§impl EggfetchConfig
impl EggfetchConfig
Sourcepub fn user_agent(self, agent: impl Into<String>) -> Self
pub fn user_agent(self, agent: impl Into<String>) -> Self
Sets the user agent.
Sourcepub fn timeouts(self, connect: Duration, total: Duration) -> Self
pub fn timeouts(self, connect: Duration, total: Duration) -> Self
Sets connect/total adapter ceilings.
These are ceilings, not defaults: the effective deadline for one fetch
is min(request, adapter ceiling) (see FetchLimits::effective).
A stricter adapter tightens a deadline; it never extends one.
Invalid values (zero or connect > total) fail closed in
EggfetchTransport::strict.
Sourcepub fn max_redirects(self, max: usize) -> Self
pub fn max_redirects(self, max: usize) -> Self
Sets the redirect bound.
Sourcepub fn proxy(self, proxy: ProxyDecision) -> Self
pub fn proxy(self, proxy: ProxyDecision) -> Self
Sets the proxy decision.
Sourcepub fn effective_timeouts(&self, limits: FetchLimits) -> (Duration, Duration)
pub fn effective_timeouts(&self, limits: FetchLimits) -> (Duration, Duration)
Derives the authoritative effective deadlines for one fetch.
A stricter adapter ceiling wins; the adapter never extends a caller
deadline. Both metadata and artifact operations use this derivation,
and the effective total covers headers plus body streaming. This
helper assumes limits.validate() has succeeded; transport entry
points perform that validation before calling it.