MCPcopy
hub / github.com/nats-io/nats.go / Watch

Method Watch

kv.go:1182–1184  ·  view source on GitHub ↗

Watch will fire the callback when a key that matches the keys pattern is updated. keys needs to be a valid NATS subject.

(keys string, opts ...WatchOpt)

Source from the content-addressed store, hash-verified

1180// Watch will fire the callback when a key that matches the keys pattern is updated.
1181// keys needs to be a valid NATS subject.
1182func (kv *kvs) Watch(keys string, opts ...WatchOpt) (KeyWatcher, error) {
1183 return kv.WatchFiltered([]string{keys}, opts...)
1184}
1185
1186// Bucket returns the current bucket name (JetStream stream).
1187func (kv *kvs) Bucket() string {

Callers 2

HistoryMethod · 0.95
WatchAllMethod · 0.95

Calls 1

WatchFilteredMethod · 0.95

Tested by

no test coverage detected