Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidCFName = errors.New("invalid column family name") ErrNotFound = os.ErrNotExist )
Functions ¶
This section is empty.
Types ¶
type DbOptions ¶
type DbOptions func(*RocksDBOption)
type KVStorage ¶
type KVStorage interface { Put(kv KV, opts ...OpOption) error Get(key []byte, opts ...OpOption) ([]byte, error) Delete(key []byte, opts ...OpOption) error NewWriteBatch() *WriteBatch DeleteBatch(keys [][]byte, safe bool) error WriteBatch(kvs []KV, safe bool) error DoBatch(batch *WriteBatch) error Flush() error NewSnapshot() *Snapshot ReleaseSnapshot(snapshot *Snapshot) NewIterator(snapshot *Snapshot, opts ...OpOption) Iterator }
type Op ¶
type Op struct { // for put PutKeys []KV // for delete DelKeys []KV // for iterator Ro *ReadOptions Snap *Snapshot }
type ReadOptions ¶
type ReadOptions struct {
*rdb.ReadOptions
}
func NewReadOptions ¶
func NewReadOptions() *ReadOptions
type RocksDBOption ¶
type RocksDBOption struct { ReadOnly bool `json:"readonly"` InfoLogLevel *uint8 `json:"log_level"` BackThreadCount int `json:"back_thread_count"` MaxBackgroundCompaction int `json:"max_background_compactions"` MaxBackgroundFlushes int `json:"max_background_flushes"` WriteBufferSize int `json:"write_buffer_size"` MaxWriteBufferNumber int `json:"max_write_buffer_number"` MaxOpenFiles int `json:"max_open_files"` BlockSize int `json:"block_size"` CreateIfMissing bool `json:"create_if_missing"` ErrorIfExists bool `json:"error_if_exists"` LRUCache int `json:"lrucache"` BloomFilterSize int `json:"bloom_filter_size"` TargetFileSizeBase uint64 `json:"target_file_size_base"` MaxBytesForLevelBase uint64 `json:"max_bytes_for_level_base"` TargetFileSizeMultiplier int `json:"target_file_size_multiplie"` NumLevels int `json:"num_levels"` Level0FileNumCompactionTrigger int `json:"level0_file_num_compaction_trigger"` Level0SlowdownWritesTrigger int `json:"level0_slowdown_writes_trigger"` Level0StopWritesTrigger int `json:"level0_stop_writes_trigger"` EnableStatistics bool `json:"enable_statistics"` AllowMMAPRead bool `json:"allow_mmap_reads"` AllowMMAPWrite bool `json:"allow_mmap_writes"` InplaceUpdateSupport bool `json:"inplace_update_support"` StatsDumpPeriodSec uint `json:"stats_dump_period_sec"` CreateIfMissingColumnFamilies bool `json:"create_if_missing_column_families"` MaxLogFileSize int `json:"max_log_file_size"` KeepLogFileNum int `json:"keep_log_file_num"` }
type WriteBatch ¶
type WriteBatch struct {
*rdb.WriteBatch
}
type WriteOptions ¶
type WriteOptions struct {
*rdb.WriteOptions
}
func NewWriteOptions ¶
func NewWriteOptions() *WriteOptions
Click to show internal directories.
Click to hide internal directories.