RateLimiter

interface RateLimiter

An interface for rate limiters.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed class State

State of the rate limiter.

Functions

Link copied to clipboard
abstract suspend fun tryConsume(tokens: Int = 1): RateLimiter.State

Tries to consume the tokens amount of tokens and returns state of the rate limiter.