Documentation ¶
Index ¶
- Variables
- type Rocks
- func (d *Rocks) AddSstByWriter(name string, writerFunc func(*gorocksdb.SSTFileWriter) (int64, error)) error
- func (d *Rocks) Close()
- func (d *Rocks) Compact()
- func (d *Rocks) CompleteClusterResize()
- func (d *Rocks) Delete(k []byte) (err error)
- func (d *Rocks) Destroy()
- func (d *Rocks) EnsureDirectory()
- func (d *Rocks) FullScan(batchSize uint64, limit uint64, fn func([]*pb.RawKeyValue) error) error
- func (d *Rocks) Get(key []byte) (data []byte, err error)
- func (d *Rocks) GetLiveFilesMetaData() []gorocksdb.LiveFileMetadata
- func (d *Rocks) LiveFilesSize() (sum uint64)
- func (d *Rocks) Merge(key []byte, msg []byte) (err error)
- func (d *Rocks) PrefixScan(prefix, lastKey []byte, limit int, fn func(key, value []byte) bool) error
- func (d *Rocks) PrepareForClusterResize()
- func (d *Rocks) Put(key []byte, msg []byte) (err error)
- func (d *Rocks) Reopen()
- func (d *Rocks) SetCompactionForShard(shardId, shardCount int)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrorShutdownInProgress error if shut down in progress ErrorShutdownInProgress = errors.New("shutdown in progress") )
Functions ¶
This section is empty.
Types ¶
type Rocks ¶
type Rocks struct {
// contains filtered or unexported fields
}
Rocks has options to run a local rocksdb instance
func NewDb ¶
func NewDb(path string, mergeOperator gorocksdb.MergeOperator) *Rocks
NewDb creates a local rocksdb instance
func (*Rocks) AddSstByWriter ¶
func (d *Rocks) AddSstByWriter(name string, writerFunc func(*gorocksdb.SSTFileWriter) (int64, error)) error
AddSstByWriter add SST by ingesting behind
func (*Rocks) CompleteClusterResize ¶
func (d *Rocks) CompleteClusterResize()
func (*Rocks) EnsureDirectory ¶
func (d *Rocks) EnsureDirectory()
func (*Rocks) GetLiveFilesMetaData ¶
func (d *Rocks) GetLiveFilesMetaData() []gorocksdb.LiveFileMetadata
GetLiveFilesMetaData returns the list of meta data of the live files
func (*Rocks) LiveFilesSize ¶
LiveFilesSize returns the size of live files
func (*Rocks) PrefixScan ¶
func (d *Rocks) PrefixScan(prefix, lastKey []byte, limit int, fn func(key, value []byte) bool) error
PrefixScan paginate through all entries with the prefix the first scan can have empty lastKey and limit = 0
func (*Rocks) PrepareForClusterResize ¶
func (d *Rocks) PrepareForClusterResize()
func (*Rocks) SetCompactionForShard ¶
SetCompactionForShard changes the compaction filter to use the shardId and shardCount. All entries not belong to the shard will be physically purged during next compaction.
Click to show internal directories.
Click to hide internal directories.