Extends
- {@link
Classes
Methods
(async) add(label, spec)
Add a {RateLimiter} singleton to this group.
Parameters:
Name | Type | Description |
---|---|---|
label |
String | The unique label identifying the RateLimiter . |
spec |
RateLimiterSpec | The spec to be used for the RateLimiter . |
(async) increment()
Increment usage by 1 for all the rate limiters in this group.
(async) initialized()
Wait for all limiters to finish init.
resumes() → {Number}
Returns:
When the group will resume from all suspensions.
- Type
- Number
suspended() → {boolean}
Returns:
True if any of the limiters are suspended.
- Type
- boolean
(async) wait()
Wait for all the limiters in this group to unblock.
willSuspendFor() → {Number}
Return the max suspend time for all the rate limiters in this group.
Returns:
Milliseconds of pending suspend or 0.
- Type
- Number