Versions in this module Expand all Collapse all v0 v0.1.0 Oct 13, 2021 Changes in this version + type Storage struct + SyncCount uint64 + func NewStorage(fs vfs.FS) *Storage + func (s *Storage) ApplySnapshot(path string) error + func (s *Storage) BatchDelete(keys ...[]byte) error + func (s *Storage) BatchSet(pairs ...[]byte) error + func (s *Storage) Close() error + func (s *Storage) CreateSnapshot(path string, start, end []byte) error + func (s *Storage) Delete(key []byte) error + func (s *Storage) Free(pooled []byte) + func (s *Storage) Get(key []byte) ([]byte, error) + func (s *Storage) MGet(keys ...[]byte) ([][]byte, error) + func (s *Storage) PrefixScan(prefix []byte, handler func(key, value []byte) (bool, error), pooledKey bool) error + func (s *Storage) RangeDelete(start, end []byte) error + func (s *Storage) RemoveShardData(shard bhmetapb.Shard, encodedStartKey, encodedEndKey []byte) error + func (s *Storage) Scan(start, end []byte, handler func(key, value []byte) (bool, error), ...) error + func (s *Storage) Seek(key []byte) ([]byte, []byte, error) + func (s *Storage) Set(key []byte, value []byte) error + func (s *Storage) SetWithTTL(key []byte, value []byte, ttl int32) error + func (s *Storage) SplitCheck(start []byte, end []byte, size uint64) (uint64, uint64, [][]byte, error) + func (s *Storage) Stats() stats.Stats + func (s *Storage) Sync() error + func (s *Storage) Write(wb *util.WriteBatch, sync bool) error