You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yes, the third parameter is used to set the maximum number of tokens
tokenBucket(/** * How many tokens are refilled per `interval` * * An interval of `10s` and refillRate of 5 will cause a new token to be added every 2 seconds. */refillRate: number,/** * The interval for the `refillRate` */interval: Duration,/** * Maximum number of tokens. * A newly created bucket starts with this many tokens. * Useful to allow higher burst limits. */maxTokens: number,)
Is there a way to make it so a bucket is instantiated with a given number of tokens?
The text was updated successfully, but these errors were encountered: