Documentation ¶
Index ¶
- Constants
- func FillDefaultOptions(opts *RockOptions)
- func SetLogLevel(level int32)
- func SetLogger(level int32, logger common.Logger)
- type DBIterator
- type Iterator
- type IteratorOpts
- type Limit
- type Range
- type RangeLimitedIterator
- func NewDBRangeIterator(db *gorocksdb.DB, min []byte, max []byte, rtype uint8, reverse bool) (*RangeLimitedIterator, error)
- func NewDBRangeIteratorWithOpts(db *gorocksdb.DB, opts IteratorOpts) (*RangeLimitedIterator, error)
- func NewDBRangeLimitIterator(db *gorocksdb.DB, min []byte, max []byte, rtype uint8, offset int, count int, ...) (*RangeLimitedIterator, error)
- func NewDBRangeLimitIteratorWithOpts(db *gorocksdb.DB, opts IteratorOpts) (*RangeLimitedIterator, error)
- func NewRangeIterator(i Iterator, r *Range) *RangeLimitedIterator
- func NewRangeLimitIterator(i Iterator, r *Range, l *Limit) *RangeLimitedIterator
- func NewRevRangeIterator(i Iterator, r *Range) *RangeLimitedIterator
- func NewRevRangeLimitIterator(i Iterator, r *Range, l *Limit) *RangeLimitedIterator
- func NewSnapshotDBRangeIterator(db *gorocksdb.DB, min []byte, max []byte, rtype uint8, reverse bool) (*RangeLimitedIterator, error)
- func NewSnapshotDBRangeLimitIterator(db *gorocksdb.DB, min []byte, max []byte, rtype uint8, offset int, count int, ...) (*RangeLimitedIterator, error)
- type RockEng
- func (r *RockEng) AddDeletedCnt(c int64)
- func (r *RockEng) CloseAll()
- func (r *RockEng) CloseEng() bool
- func (r *RockEng) CompactRange()
- func (r *RockEng) DeletedBeforeCompact() int64
- func (r *RockEng) Eng() *gorocksdb.DB
- func (r *RockEng) GetDataDir() string
- func (r *RockEng) GetInternalPropertyStatus(p string) string
- func (r *RockEng) GetInternalStatus() map[string]interface{}
- func (r *RockEng) GetOpts() *gorocksdb.Options
- func (r *RockEng) GetStatistics() string
- func (r *RockEng) GetValueWithOp(opts *gorocksdb.ReadOptions, key []byte, op func([]byte) error) error
- func (r *RockEng) GetValueWithOpNoLock(opts *gorocksdb.ReadOptions, key []byte, op func([]byte) error) error
- func (r *RockEng) LastCompactTime() int64
- func (r *RockEng) OpenEng() error
- func (r *RockEng) SetMaxBackgroundOptions(maxCompact int, maxBackJobs int) error
- type RockEngConfig
- type RockOptions
- type SharedRockConfig
Constants ¶
View Source
const ( // for data KVType byte = 21 HashType byte = 22 )
make sure keep the same with rockredis
Variables ¶
This section is empty.
Functions ¶
func FillDefaultOptions ¶
func FillDefaultOptions(opts *RockOptions)
func SetLogLevel ¶
func SetLogLevel(level int32)
Types ¶
type DBIterator ¶
func NewDBIterator ¶
func NewDBIterator(db *gorocksdb.DB, withSnap bool, prefixSame bool, lowbound []byte, upbound []byte, ignoreDel bool) (*DBIterator, error)
low_bound is inclusive upper bound is exclusive
func (*DBIterator) Close ¶
func (it *DBIterator) Close()
func (*DBIterator) Key ¶
func (it *DBIterator) Key() []byte
func (*DBIterator) NoTimestamp ¶
func (it *DBIterator) NoTimestamp(vt byte)
func (*DBIterator) RefKey ¶
func (it *DBIterator) RefKey() []byte
the bytes returned will be freed after next
func (*DBIterator) RefValue ¶
func (it *DBIterator) RefValue() []byte
the bytes returned will be freed after next
func (*DBIterator) Value ¶
func (it *DBIterator) Value() []byte
type IteratorOpts ¶
type RangeLimitedIterator ¶
type RangeLimitedIterator struct { Iterator // contains filtered or unexported fields }
func NewDBRangeIterator ¶
func NewDBRangeIteratorWithOpts ¶
func NewDBRangeIteratorWithOpts(db *gorocksdb.DB, opts IteratorOpts) (*RangeLimitedIterator, error)
func NewDBRangeLimitIterator ¶
func NewDBRangeLimitIterator(db *gorocksdb.DB, min []byte, max []byte, rtype uint8, offset int, count int, reverse bool) (*RangeLimitedIterator, error)
note: all the iterator use the prefix iterator flag. Which means it may skip the keys for different table prefix.
func NewDBRangeLimitIteratorWithOpts ¶
func NewDBRangeLimitIteratorWithOpts(db *gorocksdb.DB, opts IteratorOpts) (*RangeLimitedIterator, error)
func NewRangeIterator ¶
func NewRangeIterator(i Iterator, r *Range) *RangeLimitedIterator
func NewRangeLimitIterator ¶
func NewRangeLimitIterator(i Iterator, r *Range, l *Limit) *RangeLimitedIterator
func NewRevRangeIterator ¶
func NewRevRangeIterator(i Iterator, r *Range) *RangeLimitedIterator
func NewRevRangeLimitIterator ¶
func NewRevRangeLimitIterator(i Iterator, r *Range, l *Limit) *RangeLimitedIterator
func (*RangeLimitedIterator) Next ¶
func (it *RangeLimitedIterator) Next()
func (*RangeLimitedIterator) Valid ¶
func (it *RangeLimitedIterator) Valid() bool
type RockEng ¶
type RockEng struct {
// contains filtered or unexported fields
}
func NewRockEng ¶
func NewRockEng(cfg *RockEngConfig) (*RockEng, error)
func (*RockEng) AddDeletedCnt ¶
func (*RockEng) CompactRange ¶
func (r *RockEng) CompactRange()
func (*RockEng) DeletedBeforeCompact ¶
func (*RockEng) GetDataDir ¶
func (*RockEng) GetInternalPropertyStatus ¶
func (*RockEng) GetInternalStatus ¶
func (*RockEng) GetStatistics ¶
func (*RockEng) GetValueWithOp ¶ added in v0.7.1
func (*RockEng) GetValueWithOpNoLock ¶ added in v0.7.1
func (*RockEng) LastCompactTime ¶
type RockEngConfig ¶
type RockEngConfig struct { DataDir string EnableTableCounter bool AutoCompacted bool RockOptions }
func NewRockConfig ¶
func NewRockConfig() *RockEngConfig
type RockOptions ¶
type RockOptions struct { VerifyReadChecksum bool `json:"verify_read_checksum"` BlockSize int `json:"block_size"` BlockCache int64 `json:"block_cache"` CacheIndexAndFilterBlocks bool `json:"cache_index_and_filter_blocks"` EnablePartitionedIndexFilter bool `json:"enable_partitioned_index_filter"` WriteBufferSize int `json:"write_buffer_size"` MaxWriteBufferNumber int `json:"max_write_buffer_number"` MinWriteBufferNumberToMerge int `json:"min_write_buffer_number_to_merge"` Level0FileNumCompactionTrigger int `json:"level0_file_num_compaction_trigger"` MaxBytesForLevelBase uint64 `json:"max_bytes_for_level_base"` TargetFileSizeBase uint64 `json:"target_file_size_base"` MaxBackgroundFlushes int `json:"max_background_flushes"` MaxBackgroundCompactions int `json:"max_background_compactions"` MinLevelToCompress int `json:"min_level_to_compress"` MaxMainifestFileSize uint64 `json:"max_mainifest_file_size"` RateBytesPerSec int64 `json:"rate_bytes_per_sec"` BackgroundHighThread int `json:"background_high_thread,omitempty"` BackgroundLowThread int `json:"background_low_thread,omitempty"` AdjustThreadPool bool `json:"adjust_thread_pool,omitempty"` DisableWAL bool `json:"disable_wal,omitempty"` DisableMergeCounter bool `json:"disable_merge_counter,omitempty"` OptimizeFiltersForHits bool `json:"optimize_filters_for_hits,omitempty"` InsertHintFixedLen int `json:"insert_hint_fixed_len"` }
type SharedRockConfig ¶
type SharedRockConfig struct {}
func NewSharedRockConfig ¶
func NewSharedRockConfig(opt RockOptions) *SharedRockConfig
func (*SharedRockConfig) Destroy ¶
func (src *SharedRockConfig) Destroy()
Click to show internal directories.
Click to hide internal directories.