RateLimiterPluginConfig

data class RateLimiterPluginConfig(val rateLimiterConfig: <Error class: unknown class>, val keyResolver: KeyResolver, val onRejectedCall: OnRejectedCall, val onSuccessCall: OnSuccessCall, val excludePredicate: ExcludePredicate, val interceptPhase: <Error class: unknown class><suspend (<Error class: unknown class>) -> Unit>, val callWeight: CallWeight)(source)

Configuration for the KresilRateLimiterPlugin.

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.

Constructors

Link copied to clipboard
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)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val interceptPhase: <Error class: unknown class><suspend (<Error class: unknown class>) -> Unit>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rateLimiterConfig: <Error class: unknown class>