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

Method Get

jetstream/kv.go:1004–1014  ·  view source on GitHub ↗

Get returns the latest value for the key.

(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

1002
1003// Get returns the latest value for the key.
1004func (kv *kvs) Get(ctx context.Context, key string) (KeyValueEntry, error) {
1005 e, err := kv.get(ctx, key, kvLatestRevision)
1006 if err != nil {
1007 if errors.Is(err, ErrKeyDeleted) {
1008 return nil, ErrKeyNotFound
1009 }
1010 return nil, err
1011 }
1012
1013 return e, nil
1014}
1015
1016// GetRevision returns a specific revision value for the key.
1017func (kv *kvs) GetRevision(ctx context.Context, 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