Request rate limiting settings (per request origin).

interface RateLimitItem {
    amount: number;
    capacity: number;
    duration: string;
}

Properties

amount: number

Amount is the number of tokens refilled into the bucket each interval.

Example

10;

Minimum

0

capacity: number

Capacity is the maximum number of tokens (requests) the bucket can hold.

Example

100;

Minimum

0

duration: string

Duration is the refill interval, formatted as a Go duration string

Example

1m