remotedb

package
v1.10.25 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: GPL-3.0 Imports: 5 Imported by: 32

Documentation

Overview

Package remotedb implements the key-value database layer based on a remote geth node. Under the hood, it utilises the `debug_dbGet` method to implement a read-only database. There really are no guarantees in this database, since the local geth does not exclusive access, but it can be used for basic diagnostics of a remote node.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(endpoint string) (ethdb.Database, error)

Types

type Database

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

Database is a key-value lookup for a remote database via debug_dbGet.

func (*Database) Ancient

func (db *Database) Ancient(kind string, number uint64) ([]byte, error)

func (*Database) AncientDatadir

func (db *Database) AncientDatadir() (string, error)

func (*Database) AncientRange

func (db *Database) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error)

func (*Database) AncientSize

func (db *Database) AncientSize(kind string) (uint64, error)

func (*Database) Ancients

func (db *Database) Ancients() (uint64, error)

func (*Database) Close

func (db *Database) Close() error

func (*Database) Compact

func (db *Database) Compact(start []byte, 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) HasAncient

func (db *Database) HasAncient(kind string, number uint64) (bool, error)

func (*Database) MigrateTable

func (db *Database) MigrateTable(s string, f func([]byte) ([]byte, error)) error

func (*Database) ModifyAncients

func (db *Database) ModifyAncients(f func(ethdb.AncientWriteOp) error) (int64, error)

func (*Database) NewBatch

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

func (*Database) NewBatchWithSize

func (db *Database) NewBatchWithSize(size int) ethdb.Batch

func (*Database) NewIterator

func (db *Database) NewIterator(prefix []byte, start []byte) ethdb.Iterator

func (*Database) NewSnapshot

func (db *Database) NewSnapshot() (ethdb.Snapshot, error)

func (*Database) Put

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

func (*Database) ReadAncients

func (db *Database) ReadAncients(fn func(op ethdb.AncientReaderOp) error) (err error)

func (*Database) Stat

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

func (*Database) Sync

func (db *Database) Sync() error

func (*Database) Tail

func (db *Database) Tail() (uint64, error)

func (*Database) TruncateHead

func (db *Database) TruncateHead(n uint64) error

func (*Database) TruncateTail

func (db *Database) TruncateTail(n uint64) error

Jump to

Keyboard shortcuts

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