Companion

object Companion

Properties

Link copied to clipboard

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

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 limit tokens, and will be refilled every refillPeriod.