Next returns true if there is more key in the iterator implementation. Otherwise, it returns false
()
| 240 | // Next returns true if there is more key in the iterator implementation. |
| 241 | // Otherwise, it returns false |
| 242 | func (i *ClusterIterator) Next() bool { |
| 243 | i.mtx.Lock() |
| 244 | defer i.mtx.Unlock() |
| 245 | |
| 246 | select { |
| 247 | case <-i.ctx.Done(): |
| 248 | return false |
| 249 | default: |
| 250 | } |
| 251 | |
| 252 | return i.next() |
| 253 | } |
| 254 | |
| 255 | // Key returns a key name from the distributed map. |
| 256 | func (i *ClusterIterator) Key() string { |