MCPcopy Create free account
hub / github.com/cortexproject/cortex / Ping

Method Ping

pkg/chunk/cache/redis_client.go:74–89  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

72}
73
74func (c *RedisClient) Ping(ctx context.Context) error {
75 var cancel context.CancelFunc
76 if c.timeout > 0 {
77 ctx, cancel = context.WithTimeout(ctx, c.timeout)
78 defer cancel()
79 }
80
81 pong, err := c.rdb.Ping(ctx).Result()
82 if err != nil {
83 return err
84 }
85 if pong != "PONG" {
86 return fmt.Errorf("redis: Unexpected PING response %q", pong)
87 }
88 return nil
89}
90
91func (c *RedisClient) MSet(ctx context.Context, keys []string, values [][]byte) error {
92 var cancel context.CancelFunc

Callers 2

dbWaitFunction · 0.80
NewRedisCacheFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected