MCPcopy
hub / github.com/grafana/dskit / Get

Method Get

cache/cache.go:89–89  ·  view source on GitHub ↗

Get returns a byte slice with at least sz capacity. Length of the slice is not guaranteed and so must be asserted by callers (cache clients).

(sz int)

Source from the content-addressed store, hash-verified

87 // Get returns a byte slice with at least sz capacity. Length of the slice is
88 // not guaranteed and so must be asserted by callers (cache clients).
89 Get(sz int) *[]byte
90 // Put returns the byte slice to the underlying allocator. The cache clients
91 // will only call this method during error handling when allocated values are
92 // not returned to the caller as cache results.

Callers 4

GetMultiWithErrorMethod · 0.65
TestLRUCache_SetAddFunction · 0.65
TestPutClusterIntoHeaderFunction · 0.65

Implementers 6

nopAllocatorcache/memcached_client_test.go
mockKVkv/etcd/mock.go
mockKVkv/consul/mock.go
consulInstrumentationkv/consul/metrics.go
Clientkv/consul/client.go
Pooldns/miekgdns/resolver.go

Calls

no outgoing calls

Tested by 3

TestLRUCache_SetAddFunction · 0.52
TestPutClusterIntoHeaderFunction · 0.52