rollingdb

package
v0.0.0-...-cff1f21 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpenFileLimit = 64

Functions

This section is empty.

Types

type DBLayer

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

func NewDBLayer

func NewDBLayer(rollingPath string, name int) *DBLayer

type RawDB

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

func NewRawDB

func NewRawDB(file string) (*RawDB, error)

func (*RawDB) Close

func (db *RawDB) Close()

func (*RawDB) CountReference

func (db *RawDB) CountReference(key []byte) (int, error)

func (*RawDB) Delete

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

Delete deletes the key from the queue and database

func (*RawDB) Dereference

func (db *RawDB) Dereference(key []byte) error

func (*RawDB) Get

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

Get returns the given key if it's present.

func (*RawDB) Has

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

func (*RawDB) LDB

func (db *RawDB) LDB() *leveldb.DB

func (*RawDB) NewBatch

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

func (*RawDB) NewIterator

func (db *RawDB) NewIterator() iterator.Iterator

func (*RawDB) NewIteratorWithPrefix

func (db *RawDB) NewIteratorWithPrefix(prefix []byte) iterator.Iterator

NewIteratorWithPrefix returns a iterator to iterate over subset of database content with a particular prefix.

func (*RawDB) Path

func (db *RawDB) Path() string

Path returns the path to the database directory.

func (*RawDB) Put

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

Put puts the given key / value to the queue

func (*RawDB) Reference

func (db *RawDB) Reference(key []byte) error

type RollingDB

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

func NewRollingDB

func NewRollingDB(parentPath string, root database.Database) *RollingDB

func (*RollingDB) Close

func (rdb *RollingDB) Close()

func (*RollingDB) CountReference

func (rdb *RollingDB) CountReference(key []byte) (int, error)

func (*RollingDB) Delete

func (rdb *RollingDB) Delete(key []byte) error

func (*RollingDB) Dereference

func (rdb *RollingDB) Dereference(key []byte) error

func (*RollingDB) Get

func (rdb *RollingDB) Get(key []byte) ([]byte, error)

func (*RollingDB) Has

func (rdb *RollingDB) Has(key []byte) (bool, error)

func (*RollingDB) NewBatch

func (rdb *RollingDB) NewBatch() database.Batch

func (*RollingDB) Put

func (rdb *RollingDB) Put(key []byte, value []byte) error

func (*RollingDB) Reference

func (rdb *RollingDB) Reference(key []byte) error

func (*RollingDB) SetChain

func (rdb *RollingDB) SetChain(chain *blockchain.Chain)

func (*RollingDB) Tag

func (rdb *RollingDB) Tag(height uint64, stateRoot common.Hash)

type RollingDBBatch

type RollingDBBatch struct {
	database.Batch
	// contains filtered or unexported fields
}

func (*RollingDBBatch) Write

func (b *RollingDBBatch) Write() error

Jump to

Keyboard shortcuts

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