()
| 280 | } |
| 281 | |
| 282 | func (i *ClusterIterator) fetchRoutingTable() error { |
| 283 | routingTable, err := i.clusterClient.RoutingTable(i.ctx) |
| 284 | if err != nil { |
| 285 | return err |
| 286 | } |
| 287 | |
| 288 | i.routingTableMtx.Lock() |
| 289 | defer i.routingTableMtx.Unlock() |
| 290 | |
| 291 | // Partition count is a constant, actually. It has to be greater than zero. |
| 292 | i.partitionCount = uint64(len(routingTable)) |
| 293 | i.routingTable = routingTable |
| 294 | return nil |
| 295 | } |
| 296 | |
| 297 | // Close stops the iteration and releases allocated resources. |
| 298 | func (i *ClusterIterator) Close() { |
no test coverage detected