Documentation ¶
Index ¶
- Constants
- func NewDiskStorage(options storage.Options) storage.Storage
- type BloomFilter
- type DiskStorage
- func (ds *DiskStorage) Close()
- func (ds *DiskStorage) Count() int
- func (ds *DiskStorage) Del(key *storage.InternalKey) error
- func (ds *DiskStorage) Get(key *storage.InternalKey) ([]byte, error)
- func (ds *DiskStorage) IsIndexFile() bool
- func (ds *DiskStorage) LoadIndex()
- func (ds *DiskStorage) Put(key *storage.InternalKey, value []byte) error
- func (ds *DiskStorage) Scan(f func(k *storage.InternalKey, v []byte) bool)
- func (ds *DiskStorage) Size() int
- type DiskStorageIndex
- type Filter
- type Index
Constants ¶
View Source
const ( DiskWriterOverrideOpt = "writer" DiskReaderOverrideOpt = "reader" SegmentNameOpt = "name" )
disk backend specific options
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BloomFilter ¶
type BloomFilter struct {
// contains filtered or unexported fields
}
implement both Filter and Storage
func (*BloomFilter) Check ¶
func (b *BloomFilter) Check(key *storage.InternalKey) bool
func (*BloomFilter) Set ¶
func (b *BloomFilter) Set(key *storage.InternalKey)
type DiskStorage ¶
type DiskStorage struct {
// contains filtered or unexported fields
}
func (*DiskStorage) Close ¶
func (ds *DiskStorage) Close()
func (*DiskStorage) Count ¶
func (ds *DiskStorage) Count() int
func (*DiskStorage) Del ¶
func (ds *DiskStorage) Del(key *storage.InternalKey) error
func (*DiskStorage) Get ¶
func (ds *DiskStorage) Get(key *storage.InternalKey) ([]byte, error)
func (*DiskStorage) IsIndexFile ¶
func (ds *DiskStorage) IsIndexFile() bool
func (*DiskStorage) LoadIndex ¶
func (ds *DiskStorage) LoadIndex()
func (*DiskStorage) Put ¶
func (ds *DiskStorage) Put(key *storage.InternalKey, value []byte) error
func (*DiskStorage) Scan ¶
func (ds *DiskStorage) Scan(f func(k *storage.InternalKey, v []byte) bool)
func (*DiskStorage) Size ¶
func (ds *DiskStorage) Size() int
type DiskStorageIndex ¶
type DiskStorageIndex struct {
// contains filtered or unexported fields
}
func (*DiskStorageIndex) BuildIndex ¶
func (idx *DiskStorageIndex) BuildIndex(rd io.ReadSeeker)
func (*DiskStorageIndex) GetOffset ¶
func (idx *DiskStorageIndex) GetOffset(key *storage.InternalKey) (int64, error)
func (*DiskStorageIndex) Save ¶
func (idx *DiskStorageIndex) Save()
type Filter ¶
type Filter interface { Set(key *storage.InternalKey) Check(key *storage.InternalKey) bool }
func NewBloomFilter ¶
TODO: n comes from #keys of storage
Click to show internal directories.
Click to hide internal directories.