level

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

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

	BlocksDB = "blocks" // raw database
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.16.1

type Config struct {
	Home    string
	Options opt.Options
}

func NewDefaultConfig added in v0.16.1

func NewDefaultConfig(home string) *Config

type Database

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

func New

func New(ctx context.Context, cfg *Config) (*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

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