rocksdb

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PruneableKeys map[byte]struct{}

Functions

This section is empty.

Types

type RocksDB

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

func NewRocksDB

func NewRocksDB(name string, dir string) (*RocksDB, error)

func NewRocksDBWithOptions

func NewRocksDBWithOptions(name string, dir string, opts *gorocksdb.Options) (*RocksDB, error)

func (*RocksDB) Close

func (db *RocksDB) Close()

Implements DB.

func (*RocksDB) CompactRange

func (db *RocksDB) CompactRange(r gorocksdb.Range)

func (*RocksDB) DB

func (db *RocksDB) DB() *gorocksdb.DB

func (*RocksDB) Delete

func (db *RocksDB) Delete(key []byte)

Implements DB.

func (*RocksDB) DeleteSync

func (db *RocksDB) DeleteSync(key []byte)

Implements DB.

func (*RocksDB) Get

func (db *RocksDB) Get(key []byte) []byte

Implements DB.

func (*RocksDB) GetPruneTimestamp

func (db *RocksDB) GetPruneTimestamp() uint64

func (*RocksDB) Has

func (db *RocksDB) Has(key []byte) bool

Implements DB.

func (*RocksDB) Iterator

func (db *RocksDB) Iterator(start, end []byte) dbm.Iterator

func (*RocksDB) NewBatch

func (db *RocksDB) NewBatch() dbm.Batch

Implements DB.

func (*RocksDB) Print

func (db *RocksDB) Print()

Implements DB.

func (*RocksDB) ReverseIterator

func (db *RocksDB) ReverseIterator(start, end []byte) dbm.Iterator

func (*RocksDB) Set

func (db *RocksDB) Set(key []byte, value []byte)

Implements DB.

func (*RocksDB) SetPruneTimestamp

func (db *RocksDB) SetPruneTimestamp(t uint64)

func (*RocksDB) SetSync

func (db *RocksDB) SetSync(key []byte, value []byte)

Implements DB.

func (*RocksDB) Stats

func (db *RocksDB) Stats() map[string]string

Implements DB.

type TimestampCompactionFilter

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

We use rocksdb's customizable compact filter to prune old records

func (*TimestampCompactionFilter) Filter

func (f *TimestampCompactionFilter) Filter(level int, key, val []byte) (remove bool, newVal []byte)

If the corresponding time is too early, we prune the record

func (*TimestampCompactionFilter) Name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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