MCPcopy
hub / github.com/olric-data/olric / Next

Method Next

cluster_iterator.go:242–253  ·  view source on GitHub ↗

Next returns true if there is more key in the iterator implementation. Otherwise, it returns false

()

Source from the content-addressed store, hash-verified

240// Next returns true if there is more key in the iterator implementation.
241// Otherwise, it returns false
242func (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.
256func (i *ClusterIterator) Key() string {

Callers

nothing calls this directly

Calls 3

nextMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected