(slot int)
| 1044 | } |
| 1045 | |
| 1046 | func (c *clusterState) slotNodes(slot int) []*clusterNode { |
| 1047 | i := sort.Search(len(c.slots), func(i int) bool { |
| 1048 | return c.slots[i].end >= slot |
| 1049 | }) |
| 1050 | if i >= len(c.slots) { |
| 1051 | return nil |
| 1052 | } |
| 1053 | x := c.slots[i] |
| 1054 | if slot >= x.start && slot <= x.end { |
| 1055 | return x.nodes |
| 1056 | } |
| 1057 | return nil |
| 1058 | } |
| 1059 | |
| 1060 | //------------------------------------------------------------------------------ |
| 1061 |
no outgoing calls