Class RateLimiterAdapterOptions

Namespace
Kevlar.Extensions.RateLimiting
Assembly
Kevlar.Extensions.RateLimiting.dll

Configuration for a framework or delegate-backed rate-limiter adapter.

public sealed class RateLimiterAdapterOptions
Inheritance
RateLimiterAdapterOptions
Inherited Members

Remarks

Rejections record the standard Kevlar rejection metric, then invoke and await OnRejected. Callback failures are reported through OnCallbackError and do not replace the rejection.

Constructors

RateLimiterAdapterOptions()

public RateLimiterAdapterOptions()

Properties

Name

An optional low-cardinality name used by strategy telemetry.

public string? Name { get; set; }

Property Value

string

OnRejected

Invoked and awaited when a lease rejects an execution. Return default from a synchronous callback.

public Func<RateLimiterAdapterRejectedEvent, ValueTask>? OnRejected { get; set; }

Property Value

Func<RateLimiterAdapterRejectedEvent, ValueTask>

PermitCount

The number of permits acquired for each execution. Default 1.

public int PermitCount { get; set; }

Property Value

int