badger

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 10 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 Batch added in v0.5.1

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

func (*Batch) Begin added in v0.5.1

func (b *Batch) Begin(writable bool) storage.KeyValueTxn

func (*Batch) Commit added in v0.5.1

func (b *Batch) Commit() error

func (*Batch) Discard added in v0.5.1

func (b *Batch) Discard()

func (*Batch) Get added in v0.5.1

func (b *Batch) Get(key storage.Key) (v []byte, err error)

func (*Batch) Put added in v0.5.1

func (b *Batch) Put(key storage.Key, value []byte) error

func (*Batch) PutAll added in v0.5.1

func (b *Batch) PutAll(values map[storage.Key][]byte) error

type DB

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

func New added in v0.5.1

func New(filepath string, logger storage.Logger) (*DB, error)

func (*DB) Begin

func (db *DB) Begin(writable bool) storage.KeyValueTxn

func (*DB) Close

func (d *DB) Close() error

Close Close the underlying database

Jump to

Keyboard shortcuts

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