meta

package
v0.0.0-...-6438891 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdaptiveRadixTree

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

func NewAdaptiveRadixTree

func NewAdaptiveRadixTree() *AdaptiveRadixTree

func (*AdaptiveRadixTree) Count

func (a *AdaptiveRadixTree) Count() int

func (*AdaptiveRadixTree) Del

func (a *AdaptiveRadixTree) Del(key []byte) bool

func (*AdaptiveRadixTree) Get

func (a *AdaptiveRadixTree) Get(key []byte) *data.LogPos

func (*AdaptiveRadixTree) Iterator

func (a *AdaptiveRadixTree) Iterator(reverse bool) Iterator

func (*AdaptiveRadixTree) Put

func (a *AdaptiveRadixTree) Put(key []byte, pos *data.LogPos) bool

type BTree

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

func NewBTree

func NewBTree() *BTree

NewBTree Init BTree struct

func (*BTree) Count

func (bt *BTree) Count() int

func (*BTree) Del

func (bt *BTree) Del(key []byte) bool

func (*BTree) Get

func (bt *BTree) Get(key []byte) *data.LogPos

func (*BTree) Iterator

func (bt *BTree) Iterator(reverse bool) Iterator

func (*BTree) Put

func (bt *BTree) Put(key []byte, pos *data.LogPos) bool

type HashMap

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

func NewHashMap

func NewHashMap() *HashMap

func (*HashMap) Count

func (h *HashMap) Count() int

func (*HashMap) Del

func (h *HashMap) Del(key []byte) bool

func (*HashMap) Get

func (h *HashMap) Get(key []byte) *data.LogPos

func (*HashMap) Iterator

func (h *HashMap) Iterator(reverse bool) Iterator

func (*HashMap) Put

func (h *HashMap) Put(key []byte, pos *data.LogPos) bool

type HashMapIterator

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

func (*HashMapIterator) Close

func (hi *HashMapIterator) Close()

func (*HashMapIterator) Key

func (hi *HashMapIterator) Key() []byte

func (*HashMapIterator) Next

func (hi *HashMapIterator) Next()

func (*HashMapIterator) Rewind

func (hi *HashMapIterator) Rewind()

func (*HashMapIterator) Seek

func (hi *HashMapIterator) Seek(key []byte) bool

func (*HashMapIterator) Valid

func (hi *HashMapIterator) Valid() bool

func (*HashMapIterator) Value

func (hi *HashMapIterator) Value() *data.LogPos

type Item

type Item struct {
	Key []byte
	Pos *data.LogPos
}

func (*Item) Less

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

type Iterator

type Iterator interface {
	Rewind()
	Seek(key []byte) bool
	Next()
	Valid() bool
	Key() []byte
	Value() *data.LogPos
	Close()
}

Iterator Generic index iterator interface

type MemTable

type MemTable interface {
	// Put Stores the Pos information for key pairs in the index
	Put(key []byte, pos *data.LogPos) bool

	// Get Retrieve the Pos information based on the key
	Get(key []byte) *data.LogPos

	// Del Delete the Pos information based on the key
	Del(key []byte) bool

	// Iterator Index iterator
	Iterator(reverse bool) Iterator

	// Count get the num of all the data
	Count() int
}

func NewMemTable

func NewMemTable(typ MemTableType) MemTable

type MemTableType

type MemTableType = int8
const (
	Btree MemTableType = iota
	ART
	HASHMAP
)

Jump to

Keyboard shortcuts

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