An iterator tracks a min-heap "scan-line" of cursors through a segmentStack. Iterator implements the sort.Interface and heap.Interface on its cursors.
| 23 | // segmentStack. Iterator implements the sort.Interface and |
| 24 | // heap.Interface on its cursors. |
| 25 | type iterator struct { |
| 26 | ss *segmentStack |
| 27 | |
| 28 | cursors []*cursor // The len(cursors) <= len(ss.a) (+1 when lowerLevelIter). |
| 29 | |
| 30 | startKeyInclusive []byte |
| 31 | endKeyExclusive []byte |
| 32 | |
| 33 | prefixLen int |
| 34 | |
| 35 | lowerLevelIter Iterator // May be nil. |
| 36 | |
| 37 | closer io.Closer |
| 38 | |
| 39 | iteratorOptions IteratorOptions |
| 40 | } |
| 41 | |
| 42 | // A cursor rerpresents a logical entry position inside a segment in a |
| 43 | // segmentStack. An ssIndex < 0 and pos < 0 mean that the op/k/v came |
nothing calls this directly
no outgoing calls
no test coverage detected