MCPcopy
hub / github.com/redis/go-redis / List

Method List

ring.go:426–434  ·  view source on GitHub ↗

Warning: External exposure of `c.shards.list` may cause data races. So keep internal or implement deep copy if exposed.

()

Source from the content-addressed store, hash-verified

424// Warning: External exposure of `c.shards.list` may cause data races.
425// So keep internal or implement deep copy if exposed.
426func (c *ringSharding) List() []*ringShard {
427 c.mu.RLock()
428 defer c.mu.RUnlock()
429
430 if c.closed {
431 return nil
432 }
433 return c.shards.list
434}
435
436func (c *ringSharding) Hash(key string) string {
437 key = hashtag.Key(key)

Callers 5

HeartbeatMethod · 0.95
PoolStatsMethod · 0.80
ForEachShardMethod · 0.80
cmdsInfoMethod · 0.80
GetShardClientsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected