db

package
v0.2400.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package db implements several CometBFT DB backends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBackendName

func GetBackendName() string

GetBackendName returns the currently configured CometBFT database backend.

func GetProvider

func GetProvider() (node.DBProvider, error)

GetProvider returns the currently configured CometBFT DBProvider.

func New

func New(fn string, noSuffix bool) (dbm.DB, error)

New constructs a new CometBFT DB with the configured backend.

func WithCloser

func WithCloser(db dbm.DB, closer *Closer) dbm.DB

WithCloser wraps a CometBFT Core database instance so that it can only be closed by the given closer instance. Direct attempts to close the returned database instance will be ignored.

Types

type Closer

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

Closer manages closing of multiple CometBFT Core databases.

func NewCloser

func NewCloser() *Closer

NewCloser creates a new empty database closer.

func (*Closer) Close

func (c *Closer) Close()

Close closes all the managed databases.

Directories

Path Synopsis
Package badger implements a CometBFT DB, backed by BadgerDB.
Package badger implements a CometBFT DB, backed by BadgerDB.
Package tests is a collection of CometBFT DB backend tests.
Package tests is a collection of CometBFT DB backend tests.

Jump to

Keyboard shortcuts

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