MCPcopy
hub / github.com/aceld/zinx / IterBuffered

Method IterBuffered

zutils/shard_lock_map.go:371–380  ·  view source on GitHub ↗

IterBuffered returns a buffered iterator which could be used in a for range loop.

()

Source from the content-addressed store, hash-verified

369
370// IterBuffered returns a buffered iterator which could be used in a for range loop.
371func (slm ShardLockMaps) IterBuffered() <-chan Tuple {
372 chanList := snapshot(slm)
373 total := 0
374 for _, c := range chanList {
375 total += cap(c)
376 }
377 ch := make(chan Tuple, total)
378 go fanIn(chanList, ch)
379 return ch
380}
381
382// Items returns all items as map[string]interface{}
383func (slm ShardLockMaps) Items() map[string]interface{} {

Callers 6

TestBufferedIteratorFunction · 0.95
ClearMethod · 0.95
ItemsMethod · 0.95
MarshalJSONMethod · 0.95
ClearConnMethod · 0.80

Calls 2

snapshotFunction · 0.85
fanInFunction · 0.85

Tested by 2

TestBufferedIteratorFunction · 0.76