Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator wraps goskiplist's iterator, which is a bit janky; seeking doesn't play nice with the iteration idiom. If you seek, then iterate using the examples provided in the godoc, your iteration will always skip the first result. It would be less error prone and astonishing if Seek meant that the next call to Next() would give you what you expect.
func (*Iterator) Close ¶
func (iter *Iterator) Close()
Close this iterator to reap resources associated with it. While not strictly required, it will provide extra hints for the garbage collector.
func (*Iterator) Next ¶
Next returns true if the iterator contains subsequent elements and advances its state to the next element if that is possible.
func (*Iterator) Previous ¶
Previous returns true if the iterator contains previous elements and rewinds its state to the previous element if that is possible.
func (*Iterator) Seek ¶
Seek reduces iterative seek costs for searching forward into the Skip List by remarking the range of keys over which it has scanned before. If the requested key occurs prior to the point, the Skip List will start searching as a safeguard. It returns true if the key is within the known range of the list.