rocksdb

package
v3.3.102 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKVStore

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

NewKVStore returns a RocksDB based IKVStore instance.

Types

type KV

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

KV is a RocksDB based IKVStore type.

func (*KV) BulkRemoveEntries

func (r *KV) BulkRemoveEntries(fk []byte, lk []byte) error

BulkRemoveEntries returns the keys specified by the input range.

func (*KV) Close

func (r *KV) Close() error

Close closes the RDB object.

func (*KV) CommitWriteBatch

func (r *KV) CommitWriteBatch(wb kv.IWriteBatch) error

CommitWriteBatch commits the write batch.

func (*KV) CompactEntries

func (r *KV) CompactEntries(fk []byte, lk []byte) error

CompactEntries compacts the specified key range.

func (*KV) DeleteValue

func (r *KV) DeleteValue(key []byte) error

DeleteValue deletes the specified key value pair.

func (*KV) FullCompaction

func (r *KV) FullCompaction() error

FullCompaction compacts the whole key space.

func (*KV) GetValue

func (r *KV) GetValue(key []byte,
	op func([]byte) error) error

GetValue returns the value associated with the specified key.

func (*KV) GetWriteBatch

func (r *KV) GetWriteBatch() kv.IWriteBatch

GetWriteBatch returns a write batch instance.

func (*KV) IterateValue

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

IterateValue iterates the key value pairs.

func (*KV) Name

func (r *KV) Name() string

Name returns the IKVStore type name.

func (*KV) SaveValue

func (r *KV) SaveValue(key []byte, value []byte) error

SaveValue saves the specified key value pair.

Directories

Path Synopsis
Package gorocksdb provides the ability to create and access RocksDB databases.
Package gorocksdb provides the ability to create and access RocksDB databases.

Jump to

Keyboard shortcuts

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