RedisStateProvider
TypeExperimentalSignature
type RedisStateProvider = {
close?: () => Promise<void>;
eval: (script, keys, args) => Promise<unknown>;
};redis/src/state-provider/state-provider.redis.ts:10
Redis state provider interface.
The Redis state adapter reads and writes only through Lua scripts, so a provider wraps one command client of any Redis driver. Every script names one key, and every key the adapter touches shares one hash tag, so a cluster routes all of them to one node.
Properties
close?
Signature
close?: () => Promise<void>;redis/src/state-provider/state-provider.redis.ts:21
Releases provider-owned resources. Optional — pass-through providers (user-owned client) can omit it. When defined, must be idempotent.
Returns
Promise<void>
eval
Signature
eval: (script, keys, args) => Promise<unknown>;redis/src/state-provider/state-provider.redis.ts:15
Runs a Lua script on the command client (EVAL, or EVALSHA with an EVAL fallback) and
returns its reply.
Parameters
- script
string - keys
string[] - args
string[]
Returns
Promise<unknown>