Versions in this module Expand all Collapse all v0 v0.31.12 Oct 9, 2022 v0.31.11 Oct 29, 2019 Changes in this version + func IsKeyInDomain(key, start, end []byte) bool + func NewDebugBatch(label string, bch Batch) debugBatch + func NewDebugDB(label string, db DB) debugDB + func NewDebugIterator(label string, itr Iterator) debugIterator + func NewPrefixDB(db DB, prefix []byte) *prefixDB + type Batch interface + Close func() + Write func() + WriteSync func() + type DB interface + Close func() + Delete func([]byte) + DeleteSync func([]byte) + Get func([]byte) []byte + Has func(key []byte) bool + Iterator func(start, end []byte) Iterator + NewBatch func() Batch + Print func() + ReverseIterator func(start, end []byte) Iterator + Set func([]byte, []byte) + SetSync func([]byte, []byte) + Stats func() map[string]string + func NewDB(name string, backend DBBackendType, dir string) DB + type DBBackendType string + const BoltDBBackend + const CLevelDBBackend + const FSDBBackend + const GoLevelDBBackend + const LevelDBBackend + const MemDBBackend + type FSDB struct + func NewFSDB(dir string) *FSDB + func (db *FSDB) Close() + func (db *FSDB) Delete(key []byte) + func (db *FSDB) DeleteNoLock(key []byte) + func (db *FSDB) DeleteSync(key []byte) + func (db *FSDB) Get(key []byte) []byte + func (db *FSDB) Has(key []byte) bool + func (db *FSDB) Iterator(start, end []byte) Iterator + func (db *FSDB) MakeIterator(start, end []byte, isReversed bool) Iterator + func (db *FSDB) Mutex() *sync.Mutex + func (db *FSDB) NewBatch() Batch + func (db *FSDB) Print() + func (db *FSDB) ReverseIterator(start, end []byte) Iterator + func (db *FSDB) Set(key []byte, value []byte) + func (db *FSDB) SetNoLock(key []byte, value []byte) + func (db *FSDB) SetSync(key []byte, value []byte) + func (db *FSDB) Stats() map[string]string + type GoLevelDB struct + func NewGoLevelDB(name string, dir string) (*GoLevelDB, error) + func NewGoLevelDBWithOpts(name string, dir string, o *opt.Options) (*GoLevelDB, error) + func (db *GoLevelDB) Close() + func (db *GoLevelDB) DB() *leveldb.DB + func (db *GoLevelDB) Delete(key []byte) + func (db *GoLevelDB) DeleteSync(key []byte) + func (db *GoLevelDB) Get(key []byte) []byte + func (db *GoLevelDB) Has(key []byte) bool + func (db *GoLevelDB) Iterator(start, end []byte) Iterator + func (db *GoLevelDB) NewBatch() Batch + func (db *GoLevelDB) Print() + func (db *GoLevelDB) ReverseIterator(start, end []byte) Iterator + func (db *GoLevelDB) Set(key []byte, value []byte) + func (db *GoLevelDB) SetSync(key []byte, value []byte) + func (db *GoLevelDB) Stats() map[string]string + type Iterator interface + Close func() + Domain func() (start []byte, end []byte) + Key func() (key []byte) + Next func() + Valid func() bool + Value func() (value []byte) + func IteratePrefix(db DB, prefix []byte) Iterator + type MemDB struct + func NewMemDB() *MemDB + func (db *MemDB) Close() + func (db *MemDB) Delete(key []byte) + func (db *MemDB) DeleteNoLock(key []byte) + func (db *MemDB) DeleteNoLockSync(key []byte) + func (db *MemDB) DeleteSync(key []byte) + func (db *MemDB) Get(key []byte) []byte + func (db *MemDB) Has(key []byte) bool + func (db *MemDB) Iterator(start, end []byte) Iterator + func (db *MemDB) Mutex() *sync.Mutex + func (db *MemDB) NewBatch() Batch + func (db *MemDB) Print() + func (db *MemDB) ReverseIterator(start, end []byte) Iterator + func (db *MemDB) Set(key []byte, value []byte) + func (db *MemDB) SetNoLock(key []byte, value []byte) + func (db *MemDB) SetNoLockSync(key []byte, value []byte) + func (db *MemDB) SetSync(key []byte, value []byte) + func (db *MemDB) Stats() map[string]string + type SetDeleter interface + Delete func(key []byte) + Set func(key, value []byte)