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(client *rpc.Client) ethdb.Database
- type Database
- func (db *Database) Ancient(kind string, number uint64) ([]byte, error)
- func (db *Database) AncientDatadir() (string, error)
- func (db *Database) AncientOffSet() uint64
- func (db *Database) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error)
- func (db *Database) AncientReset(tail, head uint64) error
- func (db *Database) AncientSize(kind string) (uint64, error)
- func (db *Database) Ancients() (uint64, error)
- func (db *Database) BlockStore() ethdb.Database
- func (db *Database) BlockStoreReader() ethdb.Reader
- func (db *Database) Close() error
- func (db *Database) Compact(start []byte, limit []byte) error
- func (db *Database) Delete(key []byte) error
- func (db *Database) DeleteRange(start, end []byte) error
- func (db *Database) DiffStore() ethdb.KeyValueStore
- func (db *Database) Get(key []byte) ([]byte, error)
- func (db *Database) GetStateStore() ethdb.Database
- func (db *Database) Has(key []byte) (bool, error)
- func (db *Database) HasAncient(kind string, number uint64) (bool, error)
- func (db *Database) HasSeparateBlockStore() bool
- func (db *Database) ItemAmountInAncient() (uint64, 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) Put(key []byte, value []byte) error
- func (db *Database) ReadAncients(fn func(op ethdb.AncientReaderOp) error) (err error)
- func (db *Database) ResetTable(kind string, startAt uint64, onlyEmpty bool) error
- func (db *Database) SetBlockStore(block ethdb.Database)
- func (db *Database) SetDiffStore(diff ethdb.KeyValueStore)
- func (db *Database) SetStateStore(state ethdb.Database)
- func (db *Database) SetupFreezerEnv(env *ethdb.FreezerEnv) error
- func (db *Database) Stat() (string, error)
- func (db *Database) StateStore() ethdb.Database
- func (db *Database) StateStoreReader() ethdb.Reader
- func (db *Database) SyncAncient() error
- func (db *Database) SyncKeyValue() error
- func (db *Database) Tail() (uint64, error)
- func (db *Database) TruncateHead(n uint64) (uint64, error)
- func (db *Database) TruncateTableTail(kind string, tail uint64) (uint64, error)
- func (db *Database) TruncateTail(n uint64) (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) AncientOffSet ¶
func (*Database) AncientRange ¶
func (*Database) AncientReset ¶
func (*Database) BlockStore ¶
func (*Database) BlockStoreReader ¶
func (*Database) DeleteRange ¶
func (*Database) DiffStore ¶
func (db *Database) DiffStore() ethdb.KeyValueStore
func (*Database) GetStateStore ¶
func (*Database) HasAncient ¶
func (*Database) HasSeparateBlockStore ¶
func (*Database) ItemAmountInAncient ¶
func (*Database) ModifyAncients ¶
func (*Database) NewIterator ¶
func (*Database) ReadAncients ¶
func (db *Database) ReadAncients(fn func(op ethdb.AncientReaderOp) error) (err error)
func (*Database) ResetTable ¶
ResetTable will reset certain table with new start point
func (*Database) SetBlockStore ¶
func (*Database) SetDiffStore ¶
func (db *Database) SetDiffStore(diff ethdb.KeyValueStore)
func (*Database) SetStateStore ¶
func (*Database) SetupFreezerEnv ¶
func (db *Database) SetupFreezerEnv(env *ethdb.FreezerEnv) error
func (*Database) StateStore ¶
func (*Database) StateStoreReader ¶
func (*Database) SyncAncient ¶
func (*Database) SyncKeyValue ¶
func (*Database) TruncateTableTail ¶
TruncateTableTail will truncate certain table to new tail
Click to show internal directories.
Click to hide internal directories.