level

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

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

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) 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

Jump to

Keyboard shortcuts

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