GetNeighbors returns the N closest distinct nodes to the name input in the circle.
(name string, n int)
| 353 | |
| 354 | // GetNeighbors returns the N closest distinct nodes to the name input in the circle. |
| 355 | func (c *Consistent) GetNeighbors(name string, n int) ([]proto.Node, error) { |
| 356 | return c.GetNeighborsEx(name, n, nil) |
| 357 | } |
| 358 | |
| 359 | func hashKey(key string) proto.NodeKey { |
| 360 | return proto.NodeKey{Hash: hash.HashH([]byte(key))} |