lsm

package
v0.0.0-...-5090b74 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LsmNodeMagic = uint32(0x4CBDABDA)
	IoBlockSize  = 512
)

Variables

View Source
var (
	ErrNotFound   = fmt.Errorf("Not found")
	ErrEmptyKey   = fmt.Errorf("Empty key")
	ErrEmptyValue = fmt.Errorf("Empty value")
)
View Source
var (
	ErrLsmNodeBadMagic    = fmt.Errorf("Lsm node bad magic")
	ErrLsmNodeBadCheckSum = fmt.Errorf("Lsm node bad checksum")
)
View Source
var (
	ErrDeleted = fmt.Errorf("Deleted")
)

Functions

This section is empty.

Types

type Lsm

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

func NewLsm

func NewLsm(log log.LogInterface, rootPath string) (*Lsm, error)

func OpenLsm

func OpenLsm(log log.LogInterface, rootPath string) (*Lsm, error)

func (*Lsm) Background

func (lsm *Lsm) Background()

func (*Lsm) Close

func (lsm *Lsm) Close()

func (*Lsm) Delete

func (lsm *Lsm) Delete(key string) error

func (*Lsm) Get

func (lsm *Lsm) Get(key string) (string, error)

func (*Lsm) Set

func (lsm *Lsm) Set(key string, value string) error

type LsmNode

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

func (*LsmNode) ReadFrom

func (node *LsmNode) ReadFrom(f io.Reader) error

func (*LsmNode) WriteTo

func (node *LsmNode) WriteTo(f io.Writer) error

type SsTable

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

func (*SsTable) Close

func (st *SsTable) Close()

func (*SsTable) Erase

func (st *SsTable) Erase()

func (*SsTable) Get

func (st *SsTable) Get(key string) (string, error)

func (*SsTable) Merge

func (currSt *SsTable) Merge(prevSt *SsTable, tmpFilePath string) error

Jump to

Keyboard shortcuts

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