Versions in this module Expand all Collapse all v1 v1.3.0 Sep 13, 2018 Changes in this version + type DB struct + func Open(stor storage.Storage, o *opt.Options, opts ...Option) (*DB, error) + func OpenFile(path string, o *opt.Options, opts ...Option) (*DB, error) + func WrapDB(db *leveldb.DB, opts ...Option) *DB + func (db *DB) CompactRange(r util.Range) error + func (db *DB) Delete(key []byte, wo *opt.WriteOptions) error + func (db *DB) Get(key []byte, ro *opt.ReadOptions) (value []byte, err error) + func (db *DB) GetSnapshot() (*Snapshot, error) + func (db *DB) Has(key []byte, ro *opt.ReadOptions) (ret bool, err error) + func (db *DB) NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator + func (db *DB) OpenTransaction() (*Transaction, error) + func (db *DB) Put(key, value []byte, wo *opt.WriteOptions) error + func (db *DB) WithContext(ctx context.Context) *DB + func (db *DB) Write(batch *leveldb.Batch, wo *opt.WriteOptions) error + type Iterator struct + func WrapIterator(it iterator.Iterator, opts ...Option) *Iterator + func (it *Iterator) Release() + type Option func(*config) + func WithContext(ctx context.Context) Option + func WithServiceName(serviceName string) Option + type Snapshot struct + func WrapSnapshot(snap *leveldb.Snapshot, opts ...Option) *Snapshot + func (snap *Snapshot) Get(key []byte, ro *opt.ReadOptions) (value []byte, err error) + func (snap *Snapshot) Has(key []byte, ro *opt.ReadOptions) (ret bool, err error) + func (snap *Snapshot) NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator + func (snap *Snapshot) WithContext(ctx context.Context) *Snapshot + type Transaction struct + func WrapTransaction(tr *leveldb.Transaction, opts ...Option) *Transaction + func (tr *Transaction) Commit() error + func (tr *Transaction) Get(key []byte, ro *opt.ReadOptions) ([]byte, error) + func (tr *Transaction) Has(key []byte, ro *opt.ReadOptions) (bool, error) + func (tr *Transaction) NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator + func (tr *Transaction) WithContext(ctx context.Context) *Transaction