Documentation ¶
Index ¶
- Constants
- type SnappyBatch
- type SnappyDB
- func (s *SnappyDB) Close() error
- func (s *SnappyDB) Delete(key []byte) error
- func (s *SnappyDB) DeleteSync(key []byte) error
- func (s *SnappyDB) Get(key []byte) ([]byte, error)
- func (s *SnappyDB) Has(key []byte) (bool, error)
- func (s *SnappyDB) Iterator(start, end []byte) (tmdb.Iterator, error)
- func (s *SnappyDB) NewBatch() tmdb.Batch
- func (s *SnappyDB) Print() error
- func (s *SnappyDB) ReverseIterator(start, end []byte) (tmdb.Iterator, error)
- func (s *SnappyDB) Set(key []byte, value []byte) error
- func (s *SnappyDB) SetSync(key []byte, value []byte) error
- func (s *SnappyDB) Stats() map[string]string
Constants ¶
View Source
const ( CompatModeEnabled = iota CompatModeDisabled )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SnappyBatch ¶
type SnappyBatch struct {
// contains filtered or unexported fields
}
func NewSnappyBatch ¶
func NewSnappyBatch(batch tmdb.Batch) *SnappyBatch
func (*SnappyBatch) Close ¶
func (s *SnappyBatch) Close() error
func (*SnappyBatch) Delete ¶
func (s *SnappyBatch) Delete(key []byte) error
func (*SnappyBatch) Set ¶
func (s *SnappyBatch) Set(key, value []byte) error
func (*SnappyBatch) Write ¶
func (s *SnappyBatch) Write() error
func (*SnappyBatch) WriteSync ¶
func (s *SnappyBatch) WriteSync() error
type SnappyDB ¶
type SnappyDB struct {
// contains filtered or unexported fields
}
SnappyDB implements a tmdb.DB overlay with snappy compression/decompression Iterator is NOT supported -- main purpose of this library is to support indexer.db, which never makes use of iterators anyway NOTE: implement when needed NOTE2: monitor mem pressure, optimize by pre-allocating dst buf when there is bottleneck
func (*SnappyDB) DeleteSync ¶
func (*SnappyDB) ReverseIterator ¶
Click to show internal directories.
Click to hide internal directories.