RateLimitConfig
Defined in: src/core/types.ts:194
Token-bucket rate limit per partition. Every attempt, first attempts and retries alike, takes a token before it is sent, waiting for one when the bucket is empty. Bulkheads cap concurrency; this caps rate. Opt-in: no limit applies unless one is configured.
Properties
Section titled “Properties”tokensPerSec
Section titled “tokensPerSec”tokensPerSec:
number
Defined in: src/core/types.ts:196
Sustained attempts per second.
burst?
Section titled “burst?”
optionalburst?:number
Defined in: src/core/types.ts:199
Bucket size: attempts that may go out back to back after a quiet spell.
Default
Section titled “Default”Math.max(1, tokensPerSec) (one second’s worth)
maxWaitMs?
Section titled “maxWaitMs?”
optionalmaxWaitMs?:number
Defined in: src/core/types.ts:203
Longest an attempt may wait for its token. An attempt that would wait
longer fails at once with RateLimitedError. Omit to wait as long as
needed, bounded only by cancel() and timeout.totalMs.
