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

Method GetMulti

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

Source from the content-addressed store, hash-verified

437}
438
439func (c *MemcachedClient) GetMulti(ctx context.Context, keys []string, opts ...Option) map[string][]byte {
440 hits, err := c.GetMultiWithError(ctx, keys, opts...)
441 if err != nil {
442 if errors.Is(err, context.Canceled) {
443 return nil
444 }
445 level.Warn(c.logger).Log("msg", "failed to fetch items from memcached", "numKeys", len(keys), "firstKey", keys[0], "err", err)
446 }
447 return hits
448}
449
450func (c *MemcachedClient) GetMultiWithError(ctx context.Context, keys []string, opts ...Option) (map[string][]byte, error) {
451 if len(keys) == 0 {

Callers

nothing calls this directly

Calls 3

GetMultiWithErrorMethod · 0.95
IsMethod · 0.80
LogMethod · 0.45

Tested by

no test coverage detected