Skip to main content

RateLimitConfig

Upgather SDK


Upgather SDK / RateLimitConfig

Interface: RateLimitConfig

Defined in: lib/factories/ClientFactory.ts:28

Configuration options for rate limiting.

Extends

  • RateLimitOptions

Properties

burstCapacity?

optional burstCapacity: number

Defined in: lib/interceptors/RateLimitInterceptor.ts:13

Burst capacity (default: same as requestsPerSecond)

Inherited from

RateLimitOptions.burstCapacity


enabled

enabled: boolean

Defined in: lib/factories/ClientFactory.ts:29


endpointKeyExtractor()?

optional endpointKeyExtractor: (request) => string

Defined in: lib/interceptors/RateLimitInterceptor.ts:21

Function to extract endpoint key

Parameters

request

HttpRequest

Returns

string

Inherited from

RateLimitOptions.endpointKeyExtractor


logger?

optional logger: LoggerInterface

Defined in: lib/interceptors/RateLimitInterceptor.ts:23

Optional logger instance for rate limit events

Inherited from

RateLimitOptions.logger


maxWaitTime?

optional maxWaitTime: number

Defined in: lib/interceptors/RateLimitInterceptor.ts:17

Maximum wait time in ms (default: 5000)

Inherited from

RateLimitOptions.maxWaitTime


namespace?

optional namespace: string

Defined in: lib/interceptors/RateLimitInterceptor.ts:19

Namespace for isolation between different parts of app

Inherited from

RateLimitOptions.namespace


requestsPerSecond

requestsPerSecond: number

Defined in: lib/interceptors/RateLimitInterceptor.ts:11

Maximum requests per second

Inherited from

RateLimitOptions.requestsPerSecond


waitWhenLimited?

optional waitWhenLimited: boolean

Defined in: lib/interceptors/RateLimitInterceptor.ts:15

Whether to wait when rate limited (vs reject)

Inherited from

RateLimitOptions.waitWhenLimited