Documentation
¶
Index ¶
- func New(path string, cache int, handles int, namespace string, readonly bool) (ethdb.Database, error)
- func NewDatabase(path string) (ethdb.Database, error)
- type AncientWriter
- type Database
- func (d *Database) Ancient(kind string, number uint64) ([]byte, error)
- func (d *Database) AncientBlob(kind string, number uint64, maxBytes uint64) ([]byte, error)
- func (d *Database) AncientBlobReader(kind string, number uint64) (io.ReadSeeker, error)
- func (d *Database) AncientDatadir() (string, error)
- func (d *Database) AncientOffSet() uint64
- func (d *Database) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error)
- func (d *Database) AncientSize(kind string) (uint64, error)
- func (d *Database) Ancients() (uint64, error)
- func (d *Database) AppendAncient(number uint64, hash, header, body, receipt, td []byte) error
- func (d *Database) Close() error
- func (d *Database) CloseAncient() error
- func (d *Database) Compact(start []byte, limit []byte) error
- func (d *Database) Delete(key []byte) error
- func (d *Database) DeleteRange(start, end []byte) error
- func (d *Database) Get(key []byte) ([]byte, error)
- func (d *Database) Has(key []byte) (bool, error)
- func (d *Database) HasAncient(kind string, number uint64) (bool, error)
- func (d *Database) ItemAmountInAncient() (uint64, error)
- func (d *Database) MigrateTable(string, func([]byte) ([]byte, error)) error
- func (d *Database) ModifyAncients(fn func(ethdb.AncientWriteOp) error) (int64, error)
- func (d *Database) NewBatch() ethdb.Batch
- func (d *Database) NewBatchWithSize(size int) ethdb.Batch
- func (d *Database) NewIterator(prefix []byte, start []byte) ethdb.Iterator
- func (d *Database) NewSnapshot() (Snapshot, error)
- func (d *Database) Put(key []byte, value []byte) error
- func (d *Database) ReadAncients(fn func(ethdb.AncientReaderOp) error) (err error)
- func (d *Database) Stat() (string, error)
- func (d *Database) Sync() error
- func (d *Database) SyncAncient() error
- func (d *Database) SyncKeyValue() error
- func (d *Database) Tail() (uint64, error)
- func (d *Database) TruncateAncients(n uint64) error
- func (d *Database) TruncateHead(n uint64) (uint64, error)
- func (d *Database) TruncateTail(n uint64) (uint64, error)
- func (d *Database) Update(number uint64, hash common.Hash, header []byte, body []byte, receipts []byte, ...) error
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AncientWriter ¶ added in v1.16.28
type AncientWriter interface {
AppendAncient(number uint64, hash, header, body, receipts, td []byte) error
}
Implement AncientWriter interface methods
type Database ¶ added in v1.16.28
type Database struct {
// contains filtered or unexported fields
}
Database is a badgerdb implementation of ethdb.Database
func (*Database) AncientBlob ¶ added in v1.16.28
func (*Database) AncientBlobReader ¶ added in v1.16.28
func (*Database) AncientDatadir ¶ added in v1.16.28
AncientDatadir returns ancient datadir path
func (*Database) AncientOffSet ¶ added in v1.16.28
func (*Database) AncientRange ¶ added in v1.16.28
func (*Database) AncientSize ¶ added in v1.16.28
func (*Database) AppendAncient ¶ added in v1.16.28
Implement additional AncientStore methods that might be needed
func (*Database) CloseAncient ¶ added in v1.16.28
Implement the io.Closer interface
func (*Database) DeleteRange ¶ added in v1.16.28
DeleteRange deletes all keys in the given range
func (*Database) HasAncient ¶ added in v1.16.28
Implement AncientStore interface methods
func (*Database) ItemAmountInAncient ¶ added in v1.16.28
func (*Database) MigrateTable ¶ added in v1.16.28
func (*Database) ModifyAncients ¶ added in v1.16.28
func (*Database) NewBatchWithSize ¶ added in v1.16.28
NewBatchWithSize creates a new batch with size hint
func (*Database) NewIterator ¶ added in v1.16.28
NewIterator creates a new iterator
func (*Database) NewSnapshot ¶ added in v1.16.28
NewSnapshot creates a snapshot
func (*Database) ReadAncients ¶ added in v1.16.28
func (d *Database) ReadAncients(fn func(ethdb.AncientReaderOp) error) (err error)
func (*Database) SyncAncient ¶ added in v1.16.28
func (*Database) SyncKeyValue ¶ added in v1.16.28
func (*Database) TruncateAncients ¶ added in v1.16.28
func (*Database) TruncateHead ¶ added in v1.16.28
func (*Database) TruncateTail ¶ added in v1.16.28
Click to show internal directories.
Click to hide internal directories.