level

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockHeadersDB  = "blockheaders"
	BlocksMissingDB = "blocksmissing"
	MetadataDB      = "metadata"
	HeightHashDB    = "heighthash"
	PeersDB         = "peers"
	OutputsDB       = "outputs"
	TransactionsDB  = "transactions"

	BlocksDB = "blocks" // raw database

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func New

func New(ctx context.Context, home string, version int) (*Database, error)

func (*Database) Close

func (l *Database) Close() error

func (*Database) DB

func (l *Database) DB() Pool

func (*Database) RawDB added in v0.3.1

func (l *Database) RawDB() RawPool

func (*Database) RegisterNotification

func (l *Database) RegisterNotification(ctx context.Context, n database.NotificationName, f database.NotificationCallback, payload any) error

func (*Database) UnregisterNotification

func (l *Database) UnregisterNotification(n database.NotificationName) error

func (*Database) Version

func (l *Database) Version(ctx context.Context) (int, error)

type Pool

type Pool map[string]*leveldb.DB

type RawPool added in v0.3.1

type RawPool map[string]*rawdb.RawDB

Jump to

Keyboard shortcuts

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