badger

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TruncateBadger = false

TruncateBadger controls whether Badger is configured to truncate corrupted data. Especially on Windows, if the node is terminated abruptly, setting this may be necessary to recovering the state of the system.

However, Accumulate is not robust against this kind of interruption. If the node is terminated abruptly and restarted with this flag, some functions may break, such as synthetic transactions and anchoring.

Functions

This section is empty.

Types

type Database

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

func New

func New(filepath string) (*Database, error)

func (*Database) Begin

func (d *Database) Begin(prefix *record.Key, writable bool) keyvalue.ChangeSet

Begin begins a change set.

func (*Database) Close

func (d *Database) Close() error

Close Close the underlying database

type Slogger added in v1.3.0

type Slogger struct{}

func (Slogger) Debugf added in v1.3.0

func (l Slogger) Debugf(format string, args ...interface{})

func (Slogger) Errorf added in v1.3.0

func (l Slogger) Errorf(format string, args ...interface{})

func (Slogger) Infof added in v1.3.0

func (l Slogger) Infof(format string, args ...interface{})

func (Slogger) Warningf added in v1.3.0

func (l Slogger) Warningf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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