package skl

Import Path
	github.com/dgraph-io/badger/v4/skl (on go.dev)

Dependency Relation
	imports 5 packages, and imported by one package

Involved Source Files arena.go skl.go
Package-Level Type Names (total 4)
/* sort by: | */
Arena should be lock-free.
Iterator is an iterator over skiplist object. For new objects, you just need to initialize Iterator.list. Close frees the resources held by the iterator Key returns the key at the current position. Next advances to the next position. Prev advances to the previous position. Seek advances to the first entry with a key >= target. SeekForPrev finds an entry with key <= target. SeekToFirst seeks position at the first entry in list. Final state of iterator is Valid() iff list is not empty. SeekToLast seeks position at the last entry in list. Final state of iterator is Valid() iff list is not empty. Valid returns true iff the iterator is positioned at a valid node. Value returns value. ValueUint64 returns the uint64 value of the current node. *Iterator : github.com/prometheus/common/expfmt.Closer *Iterator : io.Closer func (*Skiplist).NewIterator() *Iterator
OnClose func() DecrRef decrements the refcount, deallocating the Skiplist when done using it Empty returns if the Skiplist is empty. Get gets the value associated with the key. It returns a valid value if it finds equal or earlier version of the same key. IncrRef increases the refcount MemSize returns the size of the Skiplist in terms of how much memory is used within its internal arena. NewIterator returns a skiplist iterator. You have to Close() the iterator. NewUniIterator returns a UniIterator. Put inserts the key-value pair. func NewSkiplist(arenaSize int64) *Skiplist
UniIterator is a unidirectional memtable iterator. It is a thin wrapper around Iterator. We like to keep Iterator as before, because it is more powerful and we might support bidirectional iterators in the future. Close implements y.Interface (and frees up the iter's resources) Key implements y.Interface Next implements y.Interface Rewind implements y.Interface Seek implements y.Interface Valid implements y.Interface Value implements y.Interface *UniIterator : github.com/dgraph-io/badger/v4/y.Iterator *UniIterator : github.com/prometheus/common/expfmt.Closer *UniIterator : io.Closer func (*Skiplist).NewUniIterator(reversed bool) *UniIterator
Package-Level Functions (only one)
NewSkiplist makes a new empty skiplist, with a given arena size
Package-Level Constants (only one)
MaxNodeSize is the memory footprint of a node of maximum height.