StateStorage

interface StateStorage

Interface for state storage implementations. A state storage is a component that allows to store the state of a rate limiter.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun compareAndSet(key: String, compareAndSetFunction: (current: BucketState?) -> BucketState)

Set the state of the bucket for the given key.

Link copied to clipboard
abstract fun getBucketState(key: String): BucketState?

Get the state of the bucket for the given key.