Type Alias KvWatchOptions

KvWatchOptions: {
    headers_only?: boolean;
    ignoreDeletes?: boolean;
    include?: KvWatchInclude;
    initializedFn?: (() => void);
    key?: string | string[];
    resumeFromRevision?: number;
}

Type declaration

  • Optionalheaders_only?: boolean

    Notification should only include entry headers

  • OptionalignoreDeletes?: boolean

    Skips notifying deletes. @default: false

  • Optionalinclude?: KvWatchInclude

    Specify what to include in the watcher, by default all last values.

  • OptionalinitializedFn?: (() => void)

    A callback that notifies when the watch has yielded all the initial values. Subsequent notifications are updates since the initial watch was established.

      • (): void
      • Returns void

  • Optionalkey?: string | string[]

    A key or wildcarded key following keys as if they were NATS subject names. Note you can specify multiple keys if running on server 2.10.x or better.

  • OptionalresumeFromRevision?: number

    Starts watching at the specified revision. This is intended for watchers that have restarted watching and have maintained some state of where they are in the watch.