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

Method GetMultiWithError

cache/versioned.go:60–71  ·  view source on GitHub ↗
(ctx context.Context, keys []string, opts ...Option)

Source from the content-addressed store, hash-verified

58}
59
60func (c *Versioned) GetMultiWithError(ctx context.Context, keys []string, opts ...Option) (map[string][]byte, error) {
61 versionedKeys := make([]string, len(keys))
62 for i, k := range keys {
63 versionedKeys[i] = c.addVersion(k)
64 }
65 versionedRes, err := c.cache.GetMultiWithError(ctx, versionedKeys, opts...)
66 res := make(map[string][]byte, len(versionedRes))
67 for k, v := range versionedRes {
68 res[c.removeVersion(k)] = v
69 }
70 return res, err
71}
72
73func (c *Versioned) Name() string {
74 return c.cache.Name()

Callers 2

GetMultiMethod · 0.95
TestVersionedFunction · 0.95

Calls 3

addVersionMethod · 0.95
removeVersionMethod · 0.95
GetMultiWithErrorMethod · 0.65

Tested by 1

TestVersionedFunction · 0.76