badger

package
v0.2102.5 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package badger contains convenience helpers for integrating BadgerDB.

Index

Constants

This section is empty.

Variables

View Source
var MigrationFlags = flag.NewFlagSet("", flag.ContinueOnError)

MigrationFlags has the migration flags.

Functions

func NewLogAdapter

func NewLogAdapter(logger *logging.Logger) badger.Logger

NewLogAdapter returns a badger.Logger backed by an oasis-node logger.

func Open added in v0.2102.0

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

Open returns a new DB object.

func OpenManaged added in v0.2102.0

func OpenManaged(opts badger.Options) (*badger.DB, error)

OpenManaged returns a new DB object in managed mode.

Types

type GCWorker

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

GCWorker is a BadgerDB value log GC worker.

func NewGCWorker

func NewGCWorker(logger *logging.Logger, db *badger.DB) *GCWorker

NewGCWorker creates a new BadgerDB value log GC worker for the provided db, logging to the specified logger.

func (*GCWorker) Close

func (gc *GCWorker) Close()

Close halts the GC worker.

Jump to

Keyboard shortcuts

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