badgerdb

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgerDB

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

BadgerDB is a connection to a BadgerDB key-value database.

func NewDB

func NewDB(dir string) (*BadgerDB, error)

NewDB creates or loads a BadgerDB key-value database inside the given directory. If dir does not exist, it will be created.

func NewDBWithOptions

func NewDBWithOptions(opts badger.Options) (*BadgerDB, error)

NewDBWithOptions creates a BadgerDB key-value database with the specified Options (https://pkg.go.dev/github.com/dgraph-io/badger/v3#Options)

func (*BadgerDB) Close

func (b *BadgerDB) Close() error

func (*BadgerDB) DeleteVersion

func (b *BadgerDB) DeleteVersion(target uint64) error

func (*BadgerDB) ReadWriter

func (b *BadgerDB) ReadWriter() db.DBReadWriter

func (*BadgerDB) Reader

func (b *BadgerDB) Reader() db.DBReader

func (*BadgerDB) ReaderAt

func (b *BadgerDB) ReaderAt(version uint64) (db.DBReader, error)

func (*BadgerDB) Revert

func (b *BadgerDB) Revert() error

func (*BadgerDB) SaveNextVersion

func (b *BadgerDB) SaveNextVersion() (uint64, error)

SaveNextVersion implements DBConnection.

func (*BadgerDB) SaveVersion

func (b *BadgerDB) SaveVersion(target uint64) error

SaveVersion implements DBConnection.

func (*BadgerDB) Stats

func (b *BadgerDB) Stats() map[string]string

func (*BadgerDB) Versions

func (b *BadgerDB) Versions() (db.VersionSet, error)

Versions implements DBConnection. Returns a VersionSet that is valid until the next call to SaveVersion or DeleteVersion.

func (*BadgerDB) Writer

func (b *BadgerDB) Writer() db.DBWriter

Jump to

Keyboard shortcuts

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