badger

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package badger providers a Badger-backed implementation of kv.Txn.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOptions

func DefaultOptions(dir string) badger.Options

DefaultOptions returns a recommended default Options value for a database rooted at dir.

Types

type DB

type DB struct {
	*badger.DB
	// contains filtered or unexported fields
}

DB holds some kv-specific state in addition to mixing in a badger.DB.

func Open

func Open(opt badger.Options) (*DB, error)

Open creates a new DB with the given options.

func (*DB) Close

func (db *DB) Close() error

Close releases unallocated Entity values and closes the database.

func (*DB) Dump

func (db *DB) Dump(w io.Writer)

func (*DB) NewTxn

func (db *DB) NewTxn(update bool) kv.TxnCommitDiscarder

NewTxn creates a new kv.Txn.

Jump to

Keyboard shortcuts

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