RateLimiterBuilder

class RateLimiterBuilder(maxRate: Long)

A builder for RateLimiter instances.

Parameters

maxRate

the maximum rate at which tokens can be consumed

Constructors

Link copied to clipboard
constructor(maxRate: Long)

Properties

Link copied to clipboard

The clock to use to get the current time. Defaults to the system clock.

Link copied to clipboard

The maximum number of tokens that can be stored in the bucket. Defaults to maxRate.

Link copied to clipboard
Link copied to clipboard

The state storage to use to store the bucket state.

Functions

Link copied to clipboard