MCPcopy Create free account
hub / github.com/couchbase/moss / iterator

Struct iterator

iterator.go:25–40  ·  view source on GitHub ↗

An iterator tracks a min-heap "scan-line" of cursors through a segmentStack. Iterator implements the sort.Interface and heap.Interface on its cursors.

Source from the content-addressed store, hash-verified

23// segmentStack. Iterator implements the sort.Interface and
24// heap.Interface on its cursors.
25type 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected