@xtandard/kit/storage/redis/internals
@xtandard/kit/storage/redis/internals — semi-public building blocks of the Redis drivers
(ADR 0004): the lazy connection, de-duplicating scanKeys, the value codecs and
createRedisKvStorage (the driver with an explicit codec and a shared connection), so a product
capability layer such as wh’s claimDue runs on the same client. Covered by the versioning policy
like any export; changes are a MINOR bump.
import { … } from "@xtandard/kit/storage/redis/internals";Functions
Section titled “Functions”| Name | Summary |
|---|---|
createRedisKvStorage |
The Redis driver with an explicit codec and optional shared connection (semi-public, ADR 0004). createRedisStorage and createRedisJSONStorage are this with a fixed codec. |
redisConnection |
Build a RedisConnection from a borrowed client or a url. |
scanKeys |
Every key a SCAN … MATCH yields, de-duplicated (SCAN may return a key more than once; node-redis v4 yields keys, v5 batches). Semi-public. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
RedisConnection |
A lazily connected node-redis client (semi-public, ADR 0004). |
RedisKvStorageOptions |
Options for createRedisKvStorage: the driver options plus the codec and connection. |
RedisLike |
Minimal structural view of the node-redis client surface the drivers use. |
RedisValueCodec |
How a variant stores values (semi-public, ADR 0004). |
Variables
Section titled “Variables”| Name | Summary |
|---|---|
jsonCodec |
Native RedisJSON documents (written with sorted keys); needs the JSON module on the server. |
stringCodec |
Plain strings containing canonical JSON; works on any Redis. |