badger

package
v0.0.1 Latest Latest
Warning

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

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

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