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

Method GetRevision

kv.go:607–617  ·  view source on GitHub ↗

GetRevision returns a specific revision value for the key.

(key string, revision uint64)

Source from the content-addressed store, hash-verified

605
606// GetRevision returns a specific revision value for the key.
607func (kv *kvs) GetRevision(key string, revision uint64) (KeyValueEntry, error) {
608 e, err := kv.get(key, revision)
609 if err != nil {
610 if errors.Is(err, ErrKeyDeleted) {
611 return nil, ErrKeyNotFound
612 }
613 return nil, err
614 }
615
616 return e, nil
617}
618
619func (kv *kvs) get(key string, revision uint64) (KeyValueEntry, error) {
620 if !keyValid(key) {

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
IsMethod · 0.45

Tested by

no test coverage detected