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

Method Get

kv.go:594–604  ·  view source on GitHub ↗

Get returns the latest value for the key.

(key string)

Source from the content-addressed store, hash-verified

592
593// Get returns the latest value for the key.
594func (kv *kvs) Get(key string) (KeyValueEntry, error) {
595 e, err := kv.get(key, kvLatestRevision)
596 if err != nil {
597 if errors.Is(err, ErrKeyDeleted) {
598 return nil, ErrKeyNotFound
599 }
600 return nil, err
601 }
602
603 return e, nil
604}
605
606// GetRevision returns a specific revision value for the key.
607func (kv *kvs) GetRevision(key string, revision uint64) (KeyValueEntry, error) {

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
IsMethod · 0.45

Tested by

no test coverage detected