memtable

package
v0.0.0-...-89416fd Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAllowedBytesExceeded = errors.New("memtable allowed bytes exceeded")

Functions

func RandUint32

func RandUint32() uint32

RandUint32 returns a lock free uint32 value.

Types

type MemTable

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

func New

func New() *MemTable

func (*MemTable) Count

func (m *MemTable) Count() uint64

func (*MemTable) Flush

func (m *MemTable) Flush(sstable *gstable.SSTable) error

func (*MemTable) Get

func (m *MemTable) Get(k []byte) ([]byte, bool)

func (*MemTable) Range

func (m *MemTable) Range(f func(k, v []byte) bool)

func (*MemTable) Scan

func (m *MemTable) Scan(k, v []byte, f func(k, v []byte) bool)

func (*MemTable) Set

func (m *MemTable) Set(k, v []byte) error

type SkipList

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

func NewSkipList

func NewSkipList() *SkipList

func (*SkipList) Count

func (sk *SkipList) Count() uint64

func (*SkipList) Get

func (sk *SkipList) Get(key []byte) ([]byte, bool)

func (*SkipList) Print

func (sk *SkipList) Print()

func (*SkipList) Range

func (sk *SkipList) Range(f func(k, v []byte) bool)

func (*SkipList) Remove

func (sk *SkipList) Remove(_ uint64) ([]byte, bool)

func (*SkipList) Scan

func (sk *SkipList) Scan(start, end []byte, f func(k, v []byte) bool)

func (*SkipList) Set

func (sk *SkipList) Set(key, value []byte) error

Jump to

Keyboard shortcuts

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