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 ¶
- func New(endpoint string) (ethdb.Database, error)
- type Database
- func (db *Database) Ancient(kind string, number uint64) ([]byte, error)
- func (db *Database) AncientDatadir() (string, error)
- func (db *Database) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error)
- func (db *Database) AncientSize(kind string) (uint64, error)
- func (db *Database) Ancients() (uint64, error)
- func (db *Database) Close() error
- func (db *Database) Compact(start []byte, limit []byte) error
- func (db *Database) Delete(key []byte) error
- func (db *Database) Get(key []byte) ([]byte, error)
- func (db *Database) Has(key []byte) (bool, error)
- func (db *Database) HasAncient(kind string, number uint64) (bool, error)
- func (db *Database) MigrateTable(s string, f func([]byte) ([]byte, error)) error
- func (db *Database) ModifyAncients(f func(ethdb.AncientWriteOp) error) (int64, error)
- func (db *Database) NewBatch() ethdb.Batch
- func (db *Database) NewBatchWithSize(size int) ethdb.Batch
- func (db *Database) NewIterator(prefix []byte, start []byte) ethdb.Iterator
- func (db *Database) NewSnapshot() (ethdb.Snapshot, error)
- func (db *Database) Put(key []byte, value []byte) error
- func (db *Database) ReadAncients(fn func(op ethdb.AncientReaderOp) error) (err error)
- func (db *Database) Stat(property string) (string, error)
- func (db *Database) Sync() error
- func (db *Database) Tail() (uint64, error)
- func (db *Database) TruncateHead(n uint64) error
- func (db *Database) TruncateTail(n uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) AncientDatadir ¶
func (*Database) AncientRange ¶
func (*Database) HasAncient ¶
func (*Database) MigrateTable ¶
func (*Database) ModifyAncients ¶
func (*Database) NewIterator ¶
func (*Database) ReadAncients ¶
func (db *Database) ReadAncients(fn func(op ethdb.AncientReaderOp) error) (err error)
func (*Database) TruncateHead ¶
func (*Database) TruncateTail ¶
Click to show internal directories.
Click to hide internal directories.