badger

package
v3.2.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MaxKeyLength = 1024

Variables

This section is empty.

Functions

func NewKVStore

func NewKVStore(config config.LogDBConfig,
	dir string, wal string, fs vfs.IFS) (kv.IKVStore, error)

NewKVStore returns a badger based IKVStore instance.

Types

type Badger

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

func (*Badger) BulkRemoveEntries

func (b *Badger) BulkRemoveEntries(firstKey []byte, lastKey []byte) error

func (*Badger) Close

func (b *Badger) Close() error

func (*Badger) CommitWriteBatch

func (b *Badger) CommitWriteBatch(wb kv.IWriteBatch) error

func (*Badger) CompactEntries

func (b *Badger) CompactEntries(firstKey []byte, lastKey []byte) error

func (*Badger) DeleteValue

func (b *Badger) DeleteValue(key []byte) error

func (*Badger) FullCompaction

func (b *Badger) FullCompaction() error

func (*Badger) GetValue

func (b *Badger) GetValue(key []byte, op func([]byte) error) error

func (*Badger) GetWriteBatch

func (b *Badger) GetWriteBatch(ctx raftio.IContext) kv.IWriteBatch

func (*Badger) IterateValue

func (b *Badger) IterateValue(fk []byte, lk []byte, inc bool, op func(key []byte, data []byte) (bool, error)) error

func (*Badger) Name

func (b *Badger) Name() string

func (*Badger) RunGC

func (b *Badger) RunGC()

func (*Badger) SaveValue

func (b *Badger) SaveValue(key []byte, value []byte) error

Jump to

Keyboard shortcuts

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