badgerdb

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package badgerdb implements the storage backends using BadgerDB.

Index

Constants

This section is empty.

Variables

View Source
var MaxGoRoutines = 16

MaxGoRoutines is the maximum number of goroutines to use for BadgerDB.

View Source
var RaftLogPrefix = storage.ConsensusPrefix.For("/log/")
View Source
var StableStorePrefix = storage.ConsensusPrefix.For("/stable/")

Functions

func New

func New(opts Options) (storage.DualStorage, error)

New creates a new BadgerDB storage.

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.

Jump to

Keyboard shortcuts

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