meterdb

package
v1.7.11-rc.13 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: BSD-3-Clause Imports: 6 Imported by: 7

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 database instance.

func New

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

New returns a new database with added metrics

func (*Database) Close

func (db *Database) Close() error

func (*Database) Compact

func (db *Database) Compact(start, limit []byte) error

func (*Database) Delete

func (db *Database) Delete(key []byte) error

func (*Database) Get

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

func (*Database) Has

func (db *Database) Has(key []byte) (bool, error)

func (*Database) Initialize

func (m *Database) Initialize(
	namespace string,
	reg prometheus.Registerer,
) error

func (*Database) NewBatch

func (db *Database) NewBatch() database.Batch

func (*Database) NewIterator

func (db *Database) NewIterator() database.Iterator

func (*Database) NewIteratorWithPrefix

func (db *Database) NewIteratorWithPrefix(prefix []byte) database.Iterator

func (*Database) NewIteratorWithStart

func (db *Database) NewIteratorWithStart(start []byte) database.Iterator

func (*Database) NewIteratorWithStartAndPrefix

func (db *Database) NewIteratorWithStartAndPrefix(
	start,
	prefix []byte,
) database.Iterator

func (*Database) Put

func (db *Database) Put(key, value []byte) error

func (*Database) Stat

func (db *Database) Stat(stat string) (string, error)

Jump to

Keyboard shortcuts

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