Aller au contenu
Français

ThrottleOptionsType

Ce contenu n’est pas encore disponible dans votre langue.

ThrottleOptionsType = object

Defined in: src/ThrottleOptions.ts:31

Plain options-object shape accepted by ActorContext.throttle.

readonly optional burst?: number

Defined in: src/ThrottleOptions.ts:40

Bucket capacity. Default: qps (one second of refill).


readonly optional clock?: Clock

Defined in: src/ThrottleOptions.ts:44

Where the throttle reads the time. Default: the wall clock.


readonly optional onExcess?: ThrottleOnExcess

Defined in: src/ThrottleOptions.ts:42

What to do when the bucket is empty. Default: 'pause'.


readonly qps: number

Defined in: src/ThrottleOptions.ts:38

Token-refill rate, tokens per second. Must be > 0. Pass Infinity to remove the throttle entirely — equivalent to ActorContext.cancelThrottle: an unlimited rate has no bucket, so none is installed.