Documentation ¶
Index ¶
- Constants
- func IteratePrefix(db corestore.KVStore, prefix []byte) (corestore.Iterator, error)
- func NewDB(dbType DBType, name, dataDir string, opts coreserver.DynamicConfig) (corestore.KVStoreWithBatch, error)
- type DBType
- type GoLevelDB
- func (db *GoLevelDB) Close() error
- func (db *GoLevelDB) Delete(key []byte) error
- func (db *GoLevelDB) DeleteSync(key []byte) error
- func (db *GoLevelDB) ForceCompact(start, limit []byte) error
- func (db *GoLevelDB) Get(key []byte) ([]byte, error)
- func (db *GoLevelDB) Has(key []byte) (bool, error)
- func (db *GoLevelDB) Iterator(start, end []byte) (corestore.Iterator, error)
- func (db *GoLevelDB) NewBatch() corestore.Batch
- func (db *GoLevelDB) NewBatchWithSize(size int) corestore.Batch
- func (db *GoLevelDB) Print() error
- func (db *GoLevelDB) RawDB() *leveldb.DB
- func (db *GoLevelDB) ReverseIterator(start, end []byte) (corestore.Iterator, error)
- func (db *GoLevelDB) Set(key, value []byte) error
- func (db *GoLevelDB) SetSync(key, value []byte) error
- func (db *GoLevelDB) Stats() map[string]string
- type MemDB
- func (db *MemDB) Close() error
- func (db *MemDB) Delete(key []byte) error
- func (db *MemDB) DeleteSync(key []byte) error
- func (db *MemDB) Get(key []byte) ([]byte, error)
- func (db *MemDB) Has(key []byte) (bool, error)
- func (db *MemDB) Iterator(start, end []byte) (corestore.Iterator, error)
- func (db *MemDB) IteratorNoMtx(start, end []byte) (corestore.Iterator, error)
- func (db *MemDB) NewBatch() corestore.Batch
- func (db *MemDB) NewBatchWithSize(size int) corestore.Batch
- func (db *MemDB) Print() error
- func (db *MemDB) ReverseIterator(start, end []byte) (corestore.Iterator, error)
- func (db *MemDB) ReverseIteratorNoMtx(start, end []byte) (corestore.Iterator, error)
- func (db *MemDB) Set(key, value []byte) error
- func (db *MemDB) SetSync(key, value []byte) error
- func (db *MemDB) Stats() map[string]string
- type PebbleDB
- func (db *PebbleDB) Close() error
- func (db *PebbleDB) Delete(key []byte) error
- func (db *PebbleDB) Get(key []byte) ([]byte, error)
- func (db *PebbleDB) Has(key []byte) (bool, error)
- func (db *PebbleDB) Iterator(start, end []byte) (corestore.Iterator, error)
- func (db *PebbleDB) NewBatch() corestore.Batch
- func (db *PebbleDB) NewBatchWithSize(size int) corestore.Batch
- func (db *PebbleDB) ReverseIterator(start, end []byte) (corestore.Iterator, error)
- func (db *PebbleDB) Set(key, value []byte) error
- type PrefixDB
- func (pdb *PrefixDB) Close() error
- func (pdb *PrefixDB) Delete(key []byte) error
- func (pdb *PrefixDB) Get(key []byte) ([]byte, error)
- func (pdb *PrefixDB) Has(key []byte) (bool, error)
- func (pdb *PrefixDB) Iterator(start, end []byte) (corestore.Iterator, error)
- func (pdb *PrefixDB) NewBatch() corestore.Batch
- func (pdb *PrefixDB) NewBatchWithSize(size int) corestore.Batch
- func (pdb *PrefixDB) Print() error
- func (pdb *PrefixDB) ReverseIterator(start, end []byte) (corestore.Iterator, error)
- func (pdb *PrefixDB) Set(key, value []byte) error
- type RocksDB
- func (db *RocksDB) Close() error
- func (db *RocksDB) Delete(key []byte) error
- func (db *RocksDB) Get(key []byte) ([]byte, error)
- func (db *RocksDB) Has(key []byte) (bool, error)
- func (db *RocksDB) Iterator(start, end []byte) (corestore.Iterator, error)
- func (db *RocksDB) NewBatch() corestore.Batch
- func (db *RocksDB) NewBatchWithSize(_ int) corestore.Batch
- func (db *RocksDB) ReverseIterator(start, end []byte) (corestore.Iterator, error)
- func (db *RocksDB) Set(key, value []byte) error
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func IteratePrefix ¶
IteratePrefix is a convenience function for iterating over a key domain restricted by prefix.
func NewDB ¶
func NewDB(dbType DBType, name, dataDir string, opts coreserver.DynamicConfig) (corestore.KVStoreWithBatch, error)
Types ¶
type GoLevelDB ¶
type GoLevelDB struct {
// contains filtered or unexported fields
}
GoLevelDB implements corestore.KVStore using github.com/syndtr/goleveldb/leveldb. It is used for only store v2 migration, since some clients use goleveldb as the IAVL v0/v1 backend.
func NewGoLevelDB ¶
func NewGoLevelDB(name, dir string, opts coreserver.DynamicConfig) (*GoLevelDB, error)
func NewGoLevelDBWithOpts ¶
func (*GoLevelDB) DeleteSync ¶
DeleteSync implements corestore.KVStore.
func (*GoLevelDB) ForceCompact ¶
func (*GoLevelDB) NewBatchWithSize ¶
NewBatchWithSize implements corestore.BatchCreator.
func (*GoLevelDB) ReverseIterator ¶
ReverseIterator implements corestore.KVStore.
type MemDB ¶
type MemDB struct {
// contains filtered or unexported fields
}
MemDB is an in-memory database backend using a B-tree for storage.
For performance reasons, all given and returned keys and values are pointers to the in-memory database, so modifying them will cause the stored values to be modified as well. All DB methods already specify that keys and values should be considered read-only, but this is especially important with MemDB.
func (*MemDB) Iterator ¶
Iterator implements DB. Takes out a read-lock on the database until the iterator is closed.
func (*MemDB) IteratorNoMtx ¶
IteratorNoMtx makes an iterator with no mutex.
func (*MemDB) NewBatchWithSize ¶
NewBatchWithSize implements DB. It does the same thing as NewBatch because we can't pre-allocate memDBBatch
func (*MemDB) ReverseIterator ¶
ReverseIterator implements DB. Takes out a read-lock on the database until the iterator is closed.
func (*MemDB) ReverseIteratorNoMtx ¶
ReverseIteratorNoMtx makes an iterator with no mutex.
type PebbleDB ¶
type PebbleDB struct {
// contains filtered or unexported fields
}
PebbleDB implements `corestore.KVStoreWithBatch` using PebbleDB as the underlying storage engine. It is used for only store v2 migration, since some clients use PebbleDB as the IAVL v0/v1 backend.
func NewPebbleDB ¶
func NewPebbleDBWithOpts ¶
func NewPebbleDBWithOpts(name, dataDir string, opts coreserver.DynamicConfig) (*PebbleDB, error)
func (*PebbleDB) ReverseIterator ¶
type PrefixDB ¶
type PrefixDB struct {
// contains filtered or unexported fields
}
PrefixDB wraps a namespace of another database as a logical database.
func NewPrefixDB ¶
func NewPrefixDB(db corestore.KVStoreWithBatch, prefix []byte) *PrefixDB
NewPrefixDB lets you namespace multiple corestore.KVStores within a single corestore.KVStore.
func (*PrefixDB) NewBatchWithSize ¶
NewBatchWithSize implements corestore.BatchCreator.
func (*PrefixDB) ReverseIterator ¶
ReverseIterator implements corestore.KVStore.
type RocksDB ¶
type RocksDB struct{}
RocksDB implements `corestore.KVStoreWithBatch` using RocksDB as the underlying storage engine. It is used for only store v2 migration, since some clients use RocksDB as the IAVL v0/v1 backend.
func NewRocksDB ¶
func NewRocksDBWithOpts ¶
func NewRocksDBWithOpts(dataDir string, opts coreserver.DynamicConfig) (*RocksDB, error)