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

Function IncludeHistory

kv.go:172–180  ·  view source on GitHub ↗

IncludeHistory instructs the key watcher to include historical values as well.

()

Source from the content-addressed store, hash-verified

170
171// IncludeHistory instructs the key watcher to include historical values as well.
172func IncludeHistory() WatchOpt {
173 return watchOptFn(func(opts *watchOpts) error {
174 if opts.updatesOnly {
175 return errors.New("nats: include history can not be used with updates only")
176 }
177 opts.includeHistory = true
178 return nil
179 })
180}
181
182// UpdatesOnly instructs the key watcher to only include updates on values (without latest values when started).
183func UpdatesOnly() WatchOpt {

Callers 1

HistoryMethod · 0.70

Calls 1

watchOptFnFuncType · 0.70

Tested by

no test coverage detected