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
check
-
Returns void
queue
- queue(func: () => void, priority?: boolean): void
-
Parameters
-
func: () => void
-
Optional priority: boolean
Returns void