Constructors
constructor
- new Bucket(tokenLimit: number, interval: number, options: { latencyRef: { latency: number }; reservedTokens: number }): Bucket
-
Parameters
-
tokenLimit: number
-
interval: number
-
options: { latencyRef: { latency: number }; reservedTokens: number }
-
latencyRef: { latency: number }
-
reservedTokens: number
Properties
interval
interval: number
lastReset
lastReset: number
lastSend
lastSend: number
tokenLimit
tokenLimit: number
tokens
tokens: number
Methods
queue
- queue(func: Function, priority?: boolean): void
-
Parameters
-
func: Function
-
Optional priority: boolean
Returns void