Documentation
¶
Index ¶
- Constants
- type ByCount
- type BySize
- type Config
- type KeyStats
- type Module
- func (filter *Module) Add(bucket string, key []byte) error
- func (filter *Module) AddValue(bucket string, key []byte, value []byte) error
- func (filter *Module) AddValueCompress(bucket string, key []byte, value []byte) error
- func (filter *Module) CheckThenAdd(bucket string, key []byte) (b bool, err error)
- func (filter *Module) Close() error
- func (filter *Module) Delete(bucket string, key []byte) error
- func (filter *Module) DeleteKey(bucket string, key []byte) error
- func (filter *Module) Exists(bucket string, key []byte) bool
- func (filter *Module) ExistsKey(bucket string, key []byte) (bool, error)
- func (filter *Module) GetCompressedValue(bucket string, key []byte) ([]byte, error)
- func (filter *Module) GetValue(bucket string, key []byte) ([]byte, error)
- func (module *Module) Name() string
- func (filter *Module) Open() error
- func (module *Module) Setup()
- func (module *Module) Start() error
- func (module *Module) Stop() error
Constants ¶
View Source
const ( SortBySize = "size" // Constant to specify sorting by size SortByCount = "count" // Constant to specify sorting by count )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByCount ¶ added in v1.1.2
type ByCount []*KeyStats
ByCount implements sort.Interface to sort KeyStats by the occurrence count of each key.
type BySize ¶ added in v1.1.2
type BySize []*KeyStats
BySize implements sort.Interface to sort KeyStats by the size of the value for each key.
type Config ¶
type Config struct {
Enabled bool `config:"enabled"`
SingleBucketMode bool `config:"single_bucket_mode"`
Path string `config:"path"`
InMemoryMode bool `config:"memory_mode"`
SyncWrites bool `config:"sync_writes"`
MemTableSize int64 `config:"mem_table_size"`
ValueLogFileSize int64 `config:"value_log_file_size"`
ValueThreshold int64 `config:"value_threshold"`
ValueLogMaxEntries uint32 `config:"value_log_max_entries"`
NumMemtables int `config:"num_mem_tables"`
NumLevelZeroTables int `config:"num_level0_tables"`
NumLevelZeroTablesStall int `config:"num_level0_tables_stall"`
ValueLogGCEnabled bool `config:"value_log_gc_enabled"`
ValueLogDiscardRatio float64 `config:"value_log_gc_discard_ratio"`
ValueLogGCIntervalInSeconds int `config:"value_log_gc_interval_in_seconds"`
}
type KeyStats ¶ added in v1.1.2
type KeyStats struct {
Key string // The key itself
Count int // The number of times the key appears in the database
Size int64 // The size of the key's associated value
}
KeyStats represents the statistics for each key, including its occurrence count and value size.
type Module ¶
func (*Module) AddValueCompress ¶
func (*Module) CheckThenAdd ¶
func (*Module) GetCompressedValue ¶
Click to show internal directories.
Click to hide internal directories.