skip

package
v0.40.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List struct {
	// contains filtered or unexported fields
}

func NewSkipList

func NewSkipList(cmp ValueCmp) *List

func (*List) Checkpoint

func (l *List) Checkpoint()

Checkpoint records a checkpoint that can be reverted to.

func (*List) Count

func (l *List) Count() int

func (*List) Get

func (l *List) Get(key []byte) (val []byte, ok bool)

func (*List) GetIterAt

func (l *List) GetIterAt(key []byte) (it *ListIter)

func (*List) GetIterFromSearchFn

func (l *List) GetIterFromSearchFn(kontinue SearchFn) (it *ListIter)

func (*List) Has

func (l *List) Has(key []byte) (ok bool)

func (*List) IterAtEnd

func (l *List) IterAtEnd() *ListIter

func (*List) IterAtStart

func (l *List) IterAtStart() *ListIter

func (*List) Put

func (l *List) Put(key, val []byte)

func (*List) Revert

func (l *List) Revert()

Revert reverts to the last recorded checkpoint.

func (*List) Truncate

func (l *List) Truncate()

Truncate deletes all entries from the list.

type ListIter

type ListIter struct {
	// contains filtered or unexported fields
}

func (*ListIter) Advance

func (it *ListIter) Advance()

func (*ListIter) Count

func (it *ListIter) Count() int

func (*ListIter) Current

func (it *ListIter) Current() (key, val []byte)

func (*ListIter) Retreat

func (it *ListIter) Retreat()

type SearchFn

type SearchFn func(nodeKey []byte) bool

type ValueCmp

type ValueCmp func(left, right []byte) int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL