meterdb

package
v1.14.1-db-metrics-fix Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database tracks the amount of time each operation takes and how many bytes are read/written to the underlying height index database.

func New

func New(
	reg prometheus.Registerer,
	namespace string,
	db database.HeightIndex,
) (*Database, error)

func (*Database) Close

func (db *Database) Close() error

func (*Database) Get

func (db *Database) Get(height uint64) ([]byte, error)

func (*Database) Has

func (db *Database) Has(height uint64) (bool, error)

func (*Database) Put

func (db *Database) Put(height uint64, block []byte) error

Jump to

Keyboard shortcuts

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