A token bucket for use with the Throttle middleware.
A token bucket for use with the Throttle middleware. Consumers can take tokens which will be refilled over time. Implementations are required to provide their own refill mechanism.
Possible implementations include a remote TokenBucket service to coordinate between different application instances.
Limits the supplied service using a provided TokenBucket
Limits the supplied service using a provided TokenBucket
a TokenBucket to use to track the rate of incoming requests.
a function that defines the response when throttled, may be supplied a suggested retry time depending on bucket implementation.
the service to transform.
a task containing the transformed service.
Limits the supplied service to a given rate of calls using an in-memory TokenBucket
Limits the supplied service to a given rate of calls using an in-memory TokenBucket
the number of calls to the service to permit within the given time period.
the time period over which a given number of calls is permitted.
the service to transform.
a task containing the transformed service.
Transform a service to reject any calls the go over a given rate.