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

Method Get

tenant/metadata.go:216–223  ·  view source on GitHub ↗

Get the value set for key.

(key string)

Source from the content-addressed store, hash-verified

214
215// Get the value set for key.
216func (m Metadata) Get(key string) (string, bool) {
217 for k, v := range m.Iter() {
218 if k == key {
219 return v, true
220 }
221 }
222 return "", false
223}
224
225// WithTenant encodes the metadata as a tenant-prefixed string.
226// The format is "tenantID:key1=val1:key2=val2" with keys sorted alphabetically.

Callers 2

HasMethod · 0.95
TestMetadata_GetFunction · 0.95

Calls 1

IterMethod · 0.95

Tested by 1

TestMetadata_GetFunction · 0.76