ReadonlynameThe name of the store (e.g. 'mongodb', 'redis', 'dynamodb')
ReadonlylibraryThe client library being used
Returns the underlying nats connection for anything not wrapped here.
Publish data to subject. The payload is encoded per the module's
encoding rules (string → UTF-8, Uint8Array → as-is).
Subscribe to subject, invoking handler for each message via the
driver's callback option (subscribe(subject, { callback })). Returns the
driver's Subscription (call .unsubscribe() / .drain() on it to stop).
The callback style is chosen over the async-iterator style so a handler
can be registered without spawning a consuming loop.
Send a request to subject and await a single reply. opts is passed
straight through to the driver (e.g. { timeout }). Resolves with the
driver's reply Msg; read .data / .string() / .json() off it.
Optionalopts: unknownLazily resolve (and cache) the JetStream KV bucket view for bucket via
connection.jetstream().views.kv(bucket). Subsequent calls for the same
bucket return the cached view.
Put value at key in bucket's KV store (encoded per the module's
encoding rules). Returns the revision number assigned by JetStream.
Get the raw value stored at key in bucket, or null if the key is
absent (or holds a deleted/purged entry). Returns the entry's
Uint8Array value; decode with TextDecoder as needed.
Delete key from bucket's KV store.
NatsStorewraps anatsNatsConnectionand exposes NATS's core publish/subscribe and request/reply operations plus JetStream KV (kvPut/kvGet/kvDelete) as a typed, promise-based API.