Documentation
¶
Index ¶
- func BatchRemove(st *Storage, r *leveldbutil.Range, limit int) (int, error)
- func NewPrefixKey(prefix KeyPrefix, a ...[]byte) []byte
- func RemoveByPrefix(st *Storage, prefix []byte) error
- type DefaultLeveldbBatch
- type KeyPrefix
- type LeveldbBatch
- type PrefixStorage
- func (st *PrefixStorage) Batch(batch *PrefixStorageBatch, opt *leveldbOpt.WriteOptions) error
- func (st *PrefixStorage) BatchFunc(ctx context.Context, batchsize uint64, wo *leveldbOpt.WriteOptions) (func(func(LeveldbBatch), func(func() error) error) error, ...)
- func (st *PrefixStorage) Close() error
- func (st *PrefixStorage) Delete(key []byte, opt *leveldbOpt.WriteOptions) error
- func (st *PrefixStorage) Exists(key []byte) (bool, error)
- func (st *PrefixStorage) Get(key []byte) ([]byte, bool, error)
- func (st *PrefixStorage) Iter(r *leveldbutil.Range, callback func([]byte, []byte) (bool, error), sort bool) error
- func (st *PrefixStorage) NewBatch() *PrefixStorageBatch
- func (st *PrefixStorage) Prefix() []byte
- func (st *PrefixStorage) Put(key, b []byte, opt *leveldbOpt.WriteOptions) error
- func (st *PrefixStorage) RawStorage() *Storage
- func (st *PrefixStorage) Remove() error
- type PrefixStorageBatch
- type Storage
- func (st *Storage) Batch(batch *leveldb.Batch, wo *leveldbOpt.WriteOptions) error
- func (st *Storage) BatchFunc(ctx context.Context, batchsize uint64, wo *leveldbOpt.WriteOptions) (func(func(LeveldbBatch), func(func() error) error) error, ...)
- func (st *Storage) BatchFuncWithNewBatch(ctx context.Context, batchsize uint64, wo *leveldbOpt.WriteOptions, ...) (add func(func(LeveldbBatch), func(func() error) error) error, ...)
- func (st *Storage) Clean() error
- func (st *Storage) Close() error
- func (st *Storage) DB() *leveldb.DB
- func (st *Storage) Delete(k []byte, opt *leveldbOpt.WriteOptions) error
- func (st *Storage) Exists(key []byte) (bool, error)
- func (st *Storage) Get(key []byte) ([]byte, bool, error)
- func (st *Storage) Iter(r *leveldbutil.Range, callback func(key []byte, raw []byte) (bool, error), ...) error
- func (st *Storage) Put(k, b []byte, opt *leveldbOpt.WriteOptions) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchRemove ¶
func NewPrefixKey ¶
func RemoveByPrefix ¶
Types ¶
type DefaultLeveldbBatch ¶
func NewDefaultLeveldbBatch ¶
func NewDefaultLeveldbBatch(b *leveldb.Batch) *DefaultLeveldbBatch
func (*DefaultLeveldbBatch) LBatch ¶
func (b *DefaultLeveldbBatch) LBatch() *leveldb.Batch
type LeveldbBatch ¶
type PrefixStorage ¶
func NewPrefixStorage ¶
func NewPrefixStorage(st *Storage, prefix []byte) *PrefixStorage
func (*PrefixStorage) Batch ¶
func (st *PrefixStorage) Batch(batch *PrefixStorageBatch, opt *leveldbOpt.WriteOptions) error
func (*PrefixStorage) BatchFunc ¶
func (st *PrefixStorage) BatchFunc( ctx context.Context, batchsize uint64, wo *leveldbOpt.WriteOptions, ) ( func(func(LeveldbBatch), func(func() error) error) error, func(func(func() error) error) error, func(), )
func (*PrefixStorage) Close ¶
func (st *PrefixStorage) Close() error
func (*PrefixStorage) Delete ¶
func (st *PrefixStorage) Delete(key []byte, opt *leveldbOpt.WriteOptions) error
func (*PrefixStorage) Iter ¶
func (st *PrefixStorage) Iter( r *leveldbutil.Range, callback func([]byte, []byte) (bool, error), sort bool, ) error
func (*PrefixStorage) NewBatch ¶
func (st *PrefixStorage) NewBatch() *PrefixStorageBatch
func (*PrefixStorage) Prefix ¶
func (st *PrefixStorage) Prefix() []byte
func (*PrefixStorage) Put ¶
func (st *PrefixStorage) Put(key, b []byte, opt *leveldbOpt.WriteOptions) error
func (*PrefixStorage) RawStorage ¶
func (st *PrefixStorage) RawStorage() *Storage
func (*PrefixStorage) Remove ¶
func (st *PrefixStorage) Remove() error
type PrefixStorageBatch ¶
func (*PrefixStorageBatch) Delete ¶
func (b *PrefixStorageBatch) Delete(key []byte)
func (*PrefixStorageBatch) LBatch ¶
func (b *PrefixStorageBatch) LBatch() *leveldb.Batch
func (*PrefixStorageBatch) Put ¶
func (b *PrefixStorageBatch) Put(key, i []byte)
type Storage ¶
func NewStorage ¶
func NewStorage(str leveldbStorage.Storage, opt *leveldbOpt.Options) (*Storage, error)
func (*Storage) Batch ¶
func (st *Storage) Batch(batch *leveldb.Batch, wo *leveldbOpt.WriteOptions) error
func (*Storage) BatchFunc ¶
func (st *Storage) BatchFunc( ctx context.Context, batchsize uint64, wo *leveldbOpt.WriteOptions, ) ( func(func(LeveldbBatch), func(func() error) error) error, func(func(func() error) error) error, func(), )
func (*Storage) BatchFuncWithNewBatch ¶
func (st *Storage) BatchFuncWithNewBatch( ctx context.Context, batchsize uint64, wo *leveldbOpt.WriteOptions, newBatch func() LeveldbBatch, ) ( add func(func(LeveldbBatch), func(func() error) error) error, done func(func(func() error) error) error, cancel func(), )
func (*Storage) Delete ¶
func (st *Storage) Delete(k []byte, opt *leveldbOpt.WriteOptions) error
func (*Storage) Put ¶
func (st *Storage) Put(k, b []byte, opt *leveldbOpt.WriteOptions) error
Click to show internal directories.
Click to hide internal directories.