arenaskl

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrArenaFull = errors.New("allocation failed because arena is full")
)
View Source
var ErrRecordExists = errors.New("record with this key already exists")

Functions

func MaxNodeSize

func MaxNodeSize(keySize, valueSize uint32) uint32

Types

type Arena

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

func NewArena

func NewArena(buf []byte) *Arena

func (*Arena) Capacity

func (a *Arena) Capacity() uint32

func (*Arena) Size

func (a *Arena) Size() uint32

type Inserter

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

func (*Inserter) Add

func (ins *Inserter) Add(list *Skiplist, key base.InternalKey, value []byte) error

type Iterator

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

func (*Iterator) Close

func (it *Iterator) Close() error

func (*Iterator) Error

func (it *Iterator) Error() error

func (*Iterator) First

func (it *Iterator) First() (*base.InternalKey, []byte)

func (*Iterator) Head

func (it *Iterator) Head() bool

func (*Iterator) Last

func (it *Iterator) Last() (*base.InternalKey, []byte)

func (*Iterator) Next

func (it *Iterator) Next() (*base.InternalKey, []byte)

func (*Iterator) Prev

func (it *Iterator) Prev() (*base.InternalKey, []byte)

func (*Iterator) SeekGE

func (it *Iterator) SeekGE(key []byte) (*base.InternalKey, []byte)

func (*Iterator) SeekLT

func (it *Iterator) SeekLT(key []byte) (*base.InternalKey, []byte)

func (*Iterator) SeekPrefixGE

func (it *Iterator) SeekPrefixGE(
	prefix, key []byte, trySeekUsingNext bool,
) (*base.InternalKey, []byte)

func (*Iterator) SetBounds

func (it *Iterator) SetBounds(lower, upper []byte)

func (*Iterator) String

func (it *Iterator) String() string

func (*Iterator) Tail

func (it *Iterator) Tail() bool

type Skiplist

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

func NewSkiplist

func NewSkiplist(arena *Arena, cmp base.Compare) *Skiplist

func (*Skiplist) Add

func (s *Skiplist) Add(key base.InternalKey, value []byte) error

func (*Skiplist) Arena

func (s *Skiplist) Arena() *Arena

func (*Skiplist) Get

func (s *Skiplist) Get(key []byte) ([]byte, bool, base.InternalKeyKind)

func (*Skiplist) Height

func (s *Skiplist) Height() uint32

func (*Skiplist) NewFlushIter

func (s *Skiplist) NewFlushIter(bytesFlushed *uint64) base.InternalIterator

func (*Skiplist) NewIter

func (s *Skiplist) NewIter(lower, upper []byte) *Iterator

func (*Skiplist) Reset

func (s *Skiplist) Reset(arena *Arena, cmp base.Compare)

func (*Skiplist) Size

func (s *Skiplist) Size() uint32

Jump to

Keyboard shortcuts

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