OptionalBurstBucket capacity (max tokens that can accumulate) — the allowed burst size. Default: TokensPerSec.
OptionalMinFloor the effective rate can be cut to by repeated throttles, so a key never fully stalls
(tokens/sec). Default: TokensPerSec / 20. Clamped to be > 0.
OptionalnowTime source. Default: Date.now.
OptionalsleepWait primitive. Default: a real setTimeout-based sleep.
OptionalSuccessAdditive-increase amount (tokens/sec) added to the effective rate on each success,
clamped to TokensPerSec. Default: TokensPerSec / 10 (≈10 successes to fully recover).
OptionalThrottleMultiplicative-decrease factor applied to the effective rate on each throttle signal (0 < f < 1). Default: 0.5 (halve the rate, like TCP).
OptionalTokensCeiling refill rate in tokens per second — the steady-state target a key ramps back toward and never exceeds. Also the rate a fresh key starts at. Default: 10.
Construction options for RateLimiter. All fields optional; sensible defaults applied.