Buckets
Collection of factories to create a BucketConfiguration.
Functions
Link copied to clipboard
Creates a BucketConfiguration with a Bandwidth of the specified capacity, and a greedy refill.
Creates a BucketConfiguration with a simple Bandwidth of the specified capacity, and a greedy refill.
Link copied to clipboard
Creates a BucketConfiguration with a single token, which gets regenerated after the given duration.
Link copied to clipboard
fun spikeProtected(capacity: Long, duration: Duration, spikeCapacity: Long, spikeDuration: Duration): BucketConfiguration
fun spikeProtected(capacity: Long, duration: Duration, spikeCapacity: Long, spikeDuration: Duration): BucketConfiguration
Creates a BucketConfiguration with: