Versions in this module Expand all Collapse all v1 v1.4.4 Nov 14, 2019 Changes in this version + type Conf struct + DBPath string + type DB struct + func CreateDB(conf *Conf) *DB + func (dbInst *DB) Close() + func (dbInst *DB) Delete(key []byte, sync bool) error + func (dbInst *DB) Get(key []byte) ([]byte, error) + func (dbInst *DB) GetIterator(startKey []byte, endKey []byte) iterator.Iterator + func (dbInst *DB) Open() + func (dbInst *DB) Put(key []byte, value []byte, sync bool) error + func (dbInst *DB) WriteBatch(batch *leveldb.Batch, sync bool) error + type DBHandle struct + func (h *DBHandle) Delete(key []byte, sync bool) error + func (h *DBHandle) Get(key []byte) ([]byte, error) + func (h *DBHandle) GetIterator(startKey []byte, endKey []byte) *Iterator + func (h *DBHandle) Put(key []byte, value []byte, sync bool) error + func (h *DBHandle) WriteBatch(batch *UpdateBatch, sync bool) error + type FileLock struct + func NewFileLock(filePath string) *FileLock + func (f *FileLock) Lock() error + func (f *FileLock) Unlock() + type Iterator struct + func (itr *Iterator) Key() []byte + type Provider struct + func NewProvider(conf *Conf) *Provider + func (p *Provider) Close() + func (p *Provider) GetDBHandle(dbName string) *DBHandle + type UpdateBatch struct + KVs map[string][]byte + func NewUpdateBatch() *UpdateBatch + func (batch *UpdateBatch) Delete(key []byte) + func (batch *UpdateBatch) Len() int + func (batch *UpdateBatch) Put(key []byte, value []byte)