Documentation
¶
Index ¶
- func CloseDB()
- func Init()
- type AnyBlockchainDB
- type BlockchainDB
- func (d *BlockchainDB) Close()
- func (db *BlockchainDB) Delete(key []byte) error
- func (db *BlockchainDB) Get(k []byte) ([]byte, error)
- func (db *BlockchainDB) GetLdb() *gorocksdb.DB
- func (db *BlockchainDB) GetNode(hash commoneth.Hash) ([]byte, error)
- func (db *BlockchainDB) InitInMemory() (*BlockchainDB, error)
- func (db *BlockchainDB) InitPermanent() (*BlockchainDB, error)
- func (db *BlockchainDB) IsKey(key []byte) (bool, error)
- func (db *BlockchainDB) LoadAll(prefix []byte) ([][]byte, error)
- func (db *BlockchainDB) LoadAllKeys(prefix []byte) ([][]byte, error)
- func (db *BlockchainDB) Put(k []byte, v []byte) error
- type InMemoryDBReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnyBlockchainDB ¶
type AnyBlockchainDB interface {
Close()
Put(k []byte, v []byte) error
LoadAllKeys(prefix []byte) ([][]byte, error)
LoadAll(prefix []byte) ([][]byte, error)
Get(k []byte) ([]byte, error)
IsKey(key []byte) (bool, error)
Delete(key []byte) error
GetLdb() *gorocksdb.DB
GetNode(common.Hash) ([]byte, error)
}
func GetDBPermanentInstance ¶
func GetDBPermanentInstance() AnyBlockchainDB
func NewInMemoryDB ¶
func NewInMemoryDB() AnyBlockchainDB
type BlockchainDB ¶
type BlockchainDB struct {
// contains filtered or unexported fields
}
var MainDB *BlockchainDB
func (*BlockchainDB) Close ¶
func (d *BlockchainDB) Close()
func (*BlockchainDB) Delete ¶
func (db *BlockchainDB) Delete(key []byte) error
func (*BlockchainDB) GetLdb ¶
func (db *BlockchainDB) GetLdb() *gorocksdb.DB
func (*BlockchainDB) InitInMemory ¶
func (db *BlockchainDB) InitInMemory() (*BlockchainDB, error)
func (*BlockchainDB) InitPermanent ¶
func (db *BlockchainDB) InitPermanent() (*BlockchainDB, error)
func (*BlockchainDB) LoadAllKeys ¶
func (db *BlockchainDB) LoadAllKeys(prefix []byte) ([][]byte, error)
type InMemoryDBReader ¶
type InMemoryDBReader struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.