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

Method Update

jetstream/kv.go:1089–1091  ·  view source on GitHub ↗

Update will update the value if the latest revision matches.

(ctx context.Context, key string, value []byte, revision uint64)

Source from the content-addressed store, hash-verified

1087
1088// Update will update the value if the latest revision matches.
1089func (kv *kvs) Update(ctx context.Context, key string, value []byte, revision uint64) (uint64, error) {
1090 return kv.updateRevision(ctx, key, value, revision, 0)
1091}
1092
1093func (kv *kvs) updateRevision(ctx context.Context, key string, value []byte, revision uint64, ttl time.Duration) (uint64, error) {
1094 if !keyValid(key) {

Callers

nothing calls this directly

Calls 1

updateRevisionMethod · 0.95

Tested by

no test coverage detected