RedisRateLimitStoreOptions
Defined in: packages/rest/src/redis.ts:248
Options for RedisRateLimitStore.
Properties
Section titled “Properties”client
Section titled “client”client:
MinimalRedisClient
Defined in: packages/rest/src/redis.ts:250
The Redis client instance (e.g. ioredis, or fromBunRedis(...)).
commandTimeout?
Section titled “commandTimeout?”
optionalcommandTimeout?:number
Defined in: packages/rest/src/redis.ts:262
Longest one Redis command may take before it counts as failed, in ms. Default 2000.
failurePolicy?
Section titled “failurePolicy?”
optionalfailurePolicy?:RedisFailurePolicy
Defined in: packages/rest/src/redis.ts:260
What to do while Redis is unreachable. Default "degraded-local".
onError?
Section titled “onError?”
optionalonError?: (operation,error) =>void
Defined in: packages/rest/src/redis.ts:258
Called whenever a Redis operation fails.
Parameters
Section titled “Parameters”operation
Section titled “operation”string
unknown
Returns
Section titled “Returns”void
prefix?
Section titled “prefix?”
optionalprefix?: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.
requireAtomic?
Section titled “requireAtomic?”
optionalrequireAtomic?:boolean
Defined in: packages/rest/src/redis.ts:264
Throw at construction when the client has no eval (no atomic reservations). Default false.
telemetry?
Section titled “telemetry?”
optionaltelemetry?:RESTTelemetry
Defined in: packages/rest/src/redis.ts:266
Receives store latency and mode events.