Skip to main content

Class: RateLimitProcessor

Dispatches rate limit definitions to resolvers registered for each transport.

Implements​

Constructors​

Constructor​

new RateLimitProcessor(): RateLimitProcessor

Returns​

RateLimitProcessor

Methods​

process()​

process(definition, context): Promise<RateLimitDecision | undefined>

Resolves a definition using the resolver for the execution transport.

Parameters​

definition​

RateLimitDefinition | undefined

context​

ExecutionContext

Returns​

Promise<RateLimitDecision | undefined>

Implementation of​

Processable.process


registerRateLimit()​

static registerRateLimit(transport, resolver?): void

Registers a transport-specific rate limit resolver. Passing undefined removes it.

Parameters​

transport​

ExecutionTransport

resolver?​

RateLimitResolver

Returns​

void