Skip to content

@xtandard/webhooks/storage/redis

Redis storage: createRedisStorage() (JSON strings) and createRedisJSONStorage() (RedisJSON documents) over node-redis, with native delivery-queue claiming and pub/sub watch.

import { … } from "@xtandard/webhooks/storage/redis";
Name Summary
createRedisJSONStorage Create a Redis-backed RedisWebhooksStorage that stores values as native RedisJSON documents (JSON.SET/JSON.GET) instead of strings — making the stored records queryable with JSONPath (JSON.GET key $.status) and indexable with RediSearch, while the webhooks system behaves identically.
createRedisStorage Create a Redis-backed RedisWebhooksStorage. Connection is lazy: the client is created/connected on the first storage operation and reused thereafter, guarded by a single connection promise so concurrent calls connect once.
Name Summary
RedisStorageOptions Options for createRedisStorage.
RedisWebhooksStorage A watchable, compare-and-swap DeliveryQueueStorage backed by Redis, plus a close() method that disconnects the client — but only the one this adapter created. A client you passed in is left for you to manage.