Skip to content

RedisRateLimitStoreOptions

Defined in: packages/rest/src/redis.ts:248

Options for RedisRateLimitStore.

client: MinimalRedisClient

Defined in: packages/rest/src/redis.ts:250

The Redis client instance (e.g. ioredis, or fromBunRedis(...)).


optional commandTimeout?: number

Defined in: packages/rest/src/redis.ts:262

Longest one Redis command may take before it counts as failed, in ms. Default 2000.


optional failurePolicy?: RedisFailurePolicy

Defined in: packages/rest/src/redis.ts:260

What to do while Redis is unreachable. Default "degraded-local".


optional onError?: (operation, error) => void

Defined in: packages/rest/src/redis.ts:258

Called whenever a Redis operation fails.

string

unknown

void


optional prefix?: string

Defined in: packages/rest/src/redis.ts:256

Prefix of every key. Defaults to lunibee:rest:; keys are then versioned (lunibee:rest:v1:…). On Redis Cluster, put a hash tag in it ({lunibee}:rest:) so one script’s keys share a slot.


optional requireAtomic?: boolean

Defined in: packages/rest/src/redis.ts:264

Throw at construction when the client has no eval (no atomic reservations). Default false.


optional telemetry?: RESTTelemetry

Defined in: packages/rest/src/redis.ts:266

Receives store latency and mode events.