KeyedRateLimiter
constructor(config: RateLimiterConfig = defaultRateLimiterConfig(), semaphoreStateFactory: () -> SemaphoreState = { InMemorySemaphoreState() })(source)
Parameters
Key
The type of key used to identify different rate limiters.
config
The configuration defining the behavior of each rate limiter.
semaphoreStateFactory
A factory function to create semaphore states for rate limiters. Defaults to creating an in-memory semaphore state for each rate limiter.