Documentation
¶
Index ¶
- Variables
- func NewBloomFilterStub(params BloomFilterParams) bloomFilterStub
- func NewStore(path string) *storeImpl
- func SafeKey(k KeyInter) []byte
- func SafeValue(k ValueInter) []byte
- type Batch
- type BloomFilter
- type BloomFilterParams
- type CacheParams
- type IterableKeyVal
- type Iterator
- type KeyInter
- type KeyVal
- func (k *KeyVal) Close() error
- func (k *KeyVal) Delete(key []byte) error
- func (k *KeyVal) Flush(b1 Batch) error
- func (k *KeyVal) Get(key []byte) ([]byte, error)
- func (k *KeyVal) Has(key []byte) (bool, error)
- func (k *KeyVal) NewBatch() (Batch, error)
- func (k *KeyVal) NewKeyIterator(prefix []byte) (Iterator, error)
- func (k *KeyVal) Put(key, val []byte) error
- type KeyValParams
- type KeyValue
- type NoOpStore
- type ValueInter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func NewBloomFilterStub ¶ added in v0.8.8
func NewBloomFilterStub(params BloomFilterParams) bloomFilterStub
func SafeValue ¶ added in v0.3.0
func SafeValue(k ValueInter) []byte
Types ¶
type BloomFilter ¶ added in v0.8.8
type BloomFilter interface {
Params() BloomFilterParams
io.WriterTo
// contains filtered or unexported methods
}
type BloomFilterParams ¶ added in v0.3.0
type BloomFilterParams struct {
// N is how many items will be added to the filter.
N int
// FalsePositiveProbability is acceptable false positive rate {0..1}.
FalsePositiveProbability float64
// Bloom store.
Store store
// Disable bloom filter.
Disable bool
}
func NewBloomFilterParams ¶ added in v0.3.0
func NewBloomFilterParams(N int, FalsePositiveProbability float64, store store) BloomFilterParams
type CacheParams ¶ added in v0.3.0
type CacheParams struct {
Size int
}
type IterableKeyVal ¶
type KeyValParams ¶ added in v0.3.0
type KeyValParams struct {
CacheParams
BloomFilterParams
WriteBuffer int
CompactionTableSize int
CompactionTotalSize int
OpenFilesCacheCapacity int
}
type ValueInter ¶ added in v0.6.0
type ValueInter interface {
Value() []byte
}
Click to show internal directories.
Click to hide internal directories.