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

Method GetRevision

jetstream/kv.go:1017–1027  ·  view source on GitHub ↗

GetRevision returns a specific revision value for the key.

(ctx context.Context, key string, revision uint64)

Source from the content-addressed store, hash-verified

1015
1016// GetRevision returns a specific revision value for the key.
1017func (kv *kvs) GetRevision(ctx context.Context, key string, revision uint64) (KeyValueEntry, error) {
1018 e, err := kv.get(ctx, key, revision)
1019 if err != nil {
1020 if errors.Is(err, ErrKeyDeleted) {
1021 return nil, ErrKeyNotFound
1022 }
1023 return nil, err
1024 }
1025
1026 return e, nil
1027}
1028
1029// Put will place the new value for the key into the store.
1030func (kv *kvs) Put(ctx context.Context, key string, value []byte) (uint64, error) {

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
IsMethod · 0.45

Tested by

no test coverage detected