sstable

package
v0.0.0-...-9aaa066 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DirName = "/tmp/mylsm/"

Variables

This section is empty.

Functions

func Compaction

func Compaction() error

Compact sstable into one file.

func Flush

func Flush(t *Table) error

func Print

func Print(root *AVLNode, indent int)

func PrintVertical

func PrintVertical(root *AVLNode)

func ReadTable

func ReadTable(f *os.File, t *Table)
func Search(searchKey string) (string, bool)

TODO: [portability] Depends on OS behavior that file order is ordered by desc.

func Write

func Write(t *Table) error

Types

type AVLNode

type AVLNode struct {
	Key      string
	Height   int
	Lhs, Rhs *AVLNode
}

func Insert

func Insert(node *AVLNode, key string) *AVLNode

type Kv

type Kv struct {
	Key       string
	Value     string
	TombStone bool
}

func ReadRow

func ReadRow(f *os.File) (Kv, error)

type Table

type Table struct {
	Kvs []Kv
}
var Memt Table

Jump to

Keyboard shortcuts

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