Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/natsws/src/mod.ts>RoKV

WebSocket NATS
Latest
interface RoKV
import { type RoKV } from "https://deno.land/x/natsws@v1.28.0/src/mod.ts";

Methods

get(k: string, opts?: { revision: number; }): Promise<KvEntry | null>

Returns the KvEntry stored under the key if it exists or null if not. Note that the entry returned could be marked with a "DEL" or "PURGE" operation which signifies the server stored the value, but it is now deleted.

history(opts?: { key?: string | string[]; }): Promise<QueuedIterator<KvEntry>>

Returns an iterator of the specified key's history (or all keys). Note you can specify multiple keys if running on server 2.10.x or better.

watch(opts?: KvWatchOptions): Promise<QueuedIterator<KvEntry>>

Returns an iterator that will yield KvEntry updates as they happen.

deprecated
close(): Promise<void>
status(): Promise<KvStatus>

Returns information about the Kv

keys(filter?: string | string[]): Promise<QueuedIterator<string>>

Returns an iterator of all the keys optionally matching the specified filter.