Skip to main content

Crate guise_pacing

Crate guise_pacing 

Source
Expand description

Cross-plane pacing primitives for requests and browser actions.

Donor implementations used to carry local copies of jitter and exponential backoff policy. This module keeps the timing math pure so HTTP clients, browser drivers, and mobile executors can share one contract without taking each other’s async or transport dependencies.

Structs§

BackoffPolicy
Exponential retry backoff policy.
BoundedNormalDelay
Bounded normally-distributed delay envelope for human-like pacing.
Jitter
Random delay envelope with an exclusive upper bound.
RequestPacer
Human-like inter-request pacing policy.

Enums§

BackoffKind
Retry category whose base delay differs by failure mode.
PacingError
Errors returned by pacing policy constructors.

Constants§

BACKOFF_429_BASE_MS
Base delay for 429 / rate-limit backoff.
BACKOFF_MAX_RETRIES
Maximum number of retry attempts used by the fleet’s HTTP backoff policy.
BACKOFF_TIMEOUT_BASE_MS
Base delay for transient timeout backoff.
MAX_PACING_BACKOFF
Hard ceiling on any pacing/backoff delay produced by this crate.
MAX_RETRY_AFTER_OBEYED
Upper bound for a server-named Retry-After cooldown.

Functions§

capped_exponential_backoff
Calculate a capped exponential backoff delay from caller-owned policy data.
capped_pow2_backoff
Calculate a capped power-of-two exponential backoff for duration policies.
capped_pow2_backoff_ms
Calculate a capped power-of-two exponential backoff from millisecond inputs.
jittered_backoff
Apply deterministic ±20% jitter to a backoff duration.
parse_retry_after
Parse a Retry-After header value at a caller-supplied clock reference.
percent_jitter
Apply randomized symmetric percent jitter to a duration.
percent_jitter_with_rng
Apply randomized symmetric percent jitter using the caller’s RNG.