Companion

object Companion

Functions

Link copied to clipboard
fun default(limit: Int, refillPeriod: Duration, initialSize: Int = limit, clock: () -> Long = ::getTimeMillis): RateLimiter

An implementation of RateLimiter that starts with initialSize tokens, and will be refreshed to limit tokens every refillPeriod

Properties

Link copied to clipboard

An implementation of RateLimiter that always has enough tokens and will never be refreshed