Warning: External exposure of `c.shards.list` may cause data races. So keep internal or implement deep copy if exposed.
()
| 424 | // Warning: External exposure of `c.shards.list` may cause data races. |
| 425 | // So keep internal or implement deep copy if exposed. |
| 426 | func (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 | |
| 436 | func (c *ringSharding) Hash(key string) string { |
| 437 | key = hashtag.Key(key) |
no outgoing calls
no test coverage detected