RateLimiterPluginConfig
constructor(rateLimiterConfig: <Error class: unknown class>, keyResolver: KeyResolver, onRejectedCall: OnRejectedCall, onSuccessCall: OnSuccessCall, excludePredicate: ExcludePredicate, interceptPhase: <Error class: unknown class><suspend (<Error class: unknown class>) -> Unit>, callWeight: CallWeight)(source)
Parameters
rateLimiterConfig
The configuration for the Kresil RateLimiter mechanism.
keyResolver
A function to resolve the key for rate limiting from the application call.
onRejectedCall
A callback to handle requests that are rejected due to rate limiting.
onSuccessCall
A callback to handle successful requests that have passed rate limiting.
excludePredicate
A predicate to determine if a request should be excluded from rate limiting.
interceptPhase
The phase in the application pipeline to intercept for rate limiting.
callWeight
A function to calculate the weight of a call for rate limiting. The weight determines how many permits a call consumes.