pub struct Policy {
pub max_attempts: u32,
pub rate_limit_cooldown: Duration,
pub burn_cooldown: Duration,
pub transient_cooldown: Duration,
pub no_checkbox_deadline: Duration,
pub warm_timeout: Duration,
pub lease_timeout: Duration,
pub probe_concurrency: usize,
pub slim_timeout: Duration,
pub slim_connect_timeout: Duration,
pub redirect_mismatch_backoff_base: Duration,
pub redirect_mismatch_backoff_max: Duration,
}Expand description
Tunables for retry/cooldown behaviour, the headed-solve deadlines, pacing, and probing. Read off
Config::policy; Policy::default is sensible for most runs.
Fields§
§max_attempts: u32The per-request rotation budget — how many exits a raw challenge burns through before giving up (winnable failures re-queue without spending it, so they retry forever).
rate_limit_cooldown: DurationHow long a rate-limited (CF 1015) exit rests before it’s leasable again. Deliberately short.
burn_cooldown: DurationHow long a reputation-blocked (CF 1020) exit is benched — longer than a rate-limit.
transient_cooldown: DurationHow long a transient blip (5xx / odd-transport) benches an exit before a retry elsewhere.
no_checkbox_deadline: DurationHow long the headed solver waits for the challenge checkbox to appear before giving up.
warm_timeout: DurationTotal solve budget for a warming solve — much shorter than a headed fetch_browser’s
--timeout. Warming is speculative bulk work across the whole catalog, so a single stuck
exit must not hold one of the few (B) browser slots for the full minute: give up fast and
let the slot try a warmable exit. (A headed fetch the caller explicitly asked for still
gets the full --timeout.)
lease_timeout: DurationHow long a resource waits on a persistently-resting pool before failing Resting.
probe_concurrency: usizeHow many exits are health-probed concurrently.
slim_timeout: DurationPer-request timeout for a slim HTTP fetch.
slim_connect_timeout: DurationConnect timeout for a slim HTTP fetch.
redirect_mismatch_backoff_base: DurationBase of the escalating domain-level backoff a confirmed structural redirect mismatch
earns (see REDIRECT_MISMATCH_BACKOFF_BASE’s docs).
redirect_mismatch_backoff_max: DurationCeiling of the domain-level redirect-mismatch backoff.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more