1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Per-egress rate-limit guard. Acquires a cross-process exclusive
//! lock on `rate-limit.lock`, observes the persisted state in
//! `rate-limit.json`, and either grants the slot, sleeps, or aborts
//! (when `--no-wait` is set). See `docs/en/spec.md` §8 for the
//! algorithm.
//!
//! Module layout:
//! - `config` — tunable limits with env overrides
//! - `outcome` — `Snapshot`, `AttemptOutcome`, `RunResult`
//! - `progress` — `RateLimitWait`, `RateLimitProgress`, `ProgressHook`
//! - `runner` — `RateLimiter` struct + the acquire / release loop
//! - `post_flight` — sibling impl block with helper methods
//! - `state` — persisted schema-2 state with schema-1 migration
//! - `store` — atomic state file + lock file pathing
//! - `wait` — wait tracker, jitter, snapshot projection
pub use ;
pub use ;
pub use RateLimiter;
pub use RateLimitState;