meta

package
v0.0.0-...-37009e5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BTreeDegree = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ART

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

func NewART

func NewART() *ART

func (*ART) Delete

func (art *ART) Delete(key K) (Loc, bool)

func (*ART) Get

func (art *ART) Get(key K) Loc

func (*ART) Iterator

func (art *ART) Iterator(opt IteratorOpt) Iterator

func (*ART) Put

func (art *ART) Put(key K, loc Loc) Loc

func (*ART) Size

func (art *ART) Size() int

type BTree

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

func NewBTree

func NewBTree() *BTree

func (*BTree) Delete

func (bt *BTree) Delete(key K) (Loc, bool)

func (*BTree) Get

func (bt *BTree) Get(key K) Loc

func (*BTree) Iterator

func (bt *BTree) Iterator(opt IteratorOpt) Iterator

func (*BTree) Put

func (bt *BTree) Put(key K, loc Loc) Loc

func (*BTree) Size

func (bt *BTree) Size() int

type IndexType

type IndexType = uint8
const (
	IndexBTree IndexType = iota
	IndexART
	IndexSKL
)

type Indexer

type Indexer interface {
	Put(key K, loc Loc) Loc
	Get(key K) Loc
	Delete(key K) (Loc, bool)
	Iterator(opt IteratorOpt) Iterator
	Size() int
}

Indexer is the interface for in-memory index.

func NewIndexer

func NewIndexer(indexType IndexType) Indexer

type Item

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

func (*Item) Less

func (i *Item) Less(bi btree.Item) bool

type Iterator

type Iterator interface {
	Rewind()
	Seek(key []byte)
	Next()
	Valid() bool
	Key() []byte
	Value() Loc
	Close()
}

type IteratorOpt

type IteratorOpt struct {
	Prefix  K
	Reverse bool
}

type K

type K = []byte

K alias for []byte

type Loc

type Loc = *wal.ChunkLoc

Loc alias for *wal.ChunkLoc

type Loc1

type Loc1 = wal.ChunkLoc

type Skiplist

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

func NewSkiplist

func NewSkiplist() *Skiplist

func (*Skiplist) Delete

func (sl *Skiplist) Delete(key K) (Loc, bool)

func (*Skiplist) Get

func (sl *Skiplist) Get(key K) Loc

func (*Skiplist) Iterator

func (sl *Skiplist) Iterator(opt IteratorOpt) Iterator

func (*Skiplist) Put

func (sl *Skiplist) Put(key K, loc Loc) Loc

func (*Skiplist) Size

func (sl *Skiplist) Size() int

Jump to

Keyboard shortcuts

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