kv

package
v0.0.0-...-a38de57 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBIterator

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

func (*DBIterator) Close

func (iter *DBIterator) Close() error

func (*DBIterator) Item

func (iter *DBIterator) Item() utils2.Item

func (*DBIterator) Next

func (iter *DBIterator) Next()

func (*DBIterator) Rewind

func (iter *DBIterator) Rewind()

func (*DBIterator) Seek

func (iter *DBIterator) Seek(key []byte)

func (*DBIterator) Valid

func (iter *DBIterator) Valid() bool

type Engine

type Engine interface {
	Set(data *utils2.Entry) error
	Get(key []byte) (*utils2.Entry, error)
	Del(key []byte) error
	NewIterator(opt *utils2.Options) utils2.Iterator
	Info() *stat
	Close() error
}

type Item

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

func (*Item) Entry

func (it *Item) Entry() *utils2.Entry

type OctopusDB

type OctopusDB struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func Open

func Open(opt *Options) *OctopusDB

func (*OctopusDB) Close

func (o *OctopusDB) Close() error

func (*OctopusDB) Del

func (o *OctopusDB) Del(key []byte) error

func (*OctopusDB) Get

func (o *OctopusDB) Get(key []byte) (*utils2.Entry, error)

func (*OctopusDB) Info

func (o *OctopusDB) Info() *stat

func (*OctopusDB) InitVlog

func (o *OctopusDB) InitVlog()

func (*OctopusDB) NewIterator

func (o *OctopusDB) NewIterator(opt *utils2.Options) utils2.Iterator

func (*OctopusDB) RunValueLogGC

func (o *OctopusDB) RunValueLogGC(discardRatio float64) error

RunValueLogGC triggers a value log garbage collection.

func (*OctopusDB) Set

func (o *OctopusDB) Set(data *utils2.Entry) error

type Options

type Options struct {
	ValueThreshold      int64
	WorkDir             string
	MemTableSize        int64
	SSTableMaxSz        int64
	ValueLogFileSize    int
	MaxBatchCount       int64
	MaxBatchSize        int64
	ValueLogMaxEntries  uint32
	VerifyValueChecksum bool
}

Options corekv 总的配置文件

func NewDefaultOptions

func NewDefaultOptions() *Options

NewDefaultOptions 返回默认的options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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