Interface RoKV

interface RoKV {
    close(): Promise<void>;
    get(k, opts?): Promise<KvEntry>;
    history(opts?): Promise<QueuedIterator<KvEntry>>;
    keys(filter?): Promise<QueuedIterator<string>>;
    status(): Promise<KvStatus>;
    watch(opts?): Promise<QueuedIterator<KvEntry>>;
}

Hierarchy (view full)

Methods

  • Returns Promise<void>

    Deprecated

    • this api is removed.
  • 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.

    Parameters

    • k: string
    • Optional opts: {
          revision: number;
      }
      • revision: number

    Returns Promise<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.

    Parameters

    • Optional opts: {
          key?: string | string[];
      }
      • Optional key?: string | string[]

    Returns Promise<QueuedIterator<KvEntry>>

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

    Parameters

    • Optional filter: string | string[]

      default to all keys

    Returns Promise<QueuedIterator<string>>

  • Returns information about the Kv

    Returns Promise<KvStatus>