database

package
v1.0.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBoltDB

func NewBoltDB(directory string, filename string) *bbolt.DB

NewBoltDB creates a new bbolt DB instance.

func NewPebbleDB

func NewPebbleDB(directory string, reportCompactionRunning func(running bool), enableFilter bool) *pebbleDB.DB

NewPebbleDB creates a new pebble DB instance.

func NewRocksDB

func NewRocksDB(path string) *rocksdb.RocksDB

NewRocksDB creates a new RocksDB instance.

Types

type Database

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

Database holds the underlying KVStore and database specific functions.

func New

func New(kvStore kvstore.KVStore, compactionRunningFunc func() bool) *Database

New creates a new Database instance.

func (*Database) CompactionRunning

func (db *Database) CompactionRunning() bool

CompactionRunning returns whether a compaction is running.

func (*Database) KVStore

func (db *Database) KVStore() kvstore.KVStore

KVStore returns the underlying KVStore.

Jump to

Keyboard shortcuts

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