Documentation
¶
Overview ¶
Package badgerdb implements the storage backends using BadgerDB.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BadgerGoRoutines = 16
BadgerGoRoutines is the maximum number of goroutines to use for BadgerDB.
View Source
var RaftLogPrefix = storage.ConsensusPrefix.For([]byte("/log/"))
View Source
var StableStorePrefix = storage.ConsensusPrefix.For([]byte("/stable/"))
Functions ¶
func NewInMemory ¶ added in v0.7.2
func NewInMemory(opts Options) (storage.DualStorage, error)
NewInMemory creates a new in-memory BadgerDB storage.
Types ¶
type Options ¶
type Options struct {
// InMemory specifies whether to use an in-memory storage.
InMemory bool
// DiskPath is the path to use for disk storage.
DiskPath string
// SyncWrites specifies whether to sync writes to disk.
SyncWrites bool
// Debug specifies whether to enable debug logging.
Debug bool
}
Options are the options for creating a new NutsDB storage.
Click to show internal directories.
Click to hide internal directories.