Rate Limiter Registry
Registry for managing multiple named rate limiters.
Example usage:
val registry = RateLimiterRegistry.create()
val apiLimiter = registry.getOrCreate("api") {
permitsPerSecond = 100.0
burstCapacity = 200
}Content copied to clipboard
Types
Link copied to clipboard
object Companion
Factory for RateLimiterRegistry.
Functions
Link copied to clipboard
Gets an existing rate limiter by name.
Link copied to clipboard
Gets statistics for all rate limiters.
Link copied to clipboard
suspend fun getOrCreate(name: String, configure: RateLimiterConfigBuilder.() -> Unit? = null): RateLimiter
Gets an existing rate limiter or creates a new one.
Link copied to clipboard
Removes a rate limiter from the registry.