MCPcopy
hub / github.com/grafana/tempo / Ping

Method Ping

pkg/cache/redis_client.go:84–99  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

82}
83
84func (c *RedisClient) Ping(ctx context.Context) error {
85 var cancel context.CancelFunc
86 if c.timeout > 0 {
87 ctx, cancel = context.WithTimeout(ctx, c.timeout)
88 defer cancel()
89 }
90
91 pong, err := c.rdb.Ping(ctx).Result()
92 if err != nil {
93 return err
94 }
95 if pong != "PONG" {
96 return fmt.Errorf("redis: Unexpected PING response %q", pong)
97 }
98 return nil
99}
100
101func (c *RedisClient) MSet(ctx context.Context, keys []string, values [][]byte) error {
102 var cancel context.CancelFunc

Callers 2

NewRedisCacheFunction · 0.80
WaitForKafkaBrokerFunction · 0.80

Calls 1

ResultMethod · 0.65

Tested by

no test coverage detected