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 ¶
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) Delete ¶
Delete deletes from local rocksdb
func (*Rocks) FullScan ¶
FullScan scan through all entries
func (*Rocks) Get ¶
Get gets from local rocksdb
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) Merge ¶
Merge merges to local rocksdb
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) Put ¶
Put puts to local rocksdb
Source Files
¶
- rocksdb.go
- rocksdb_full_scan.go
- rocksdb_prefix_scan.go
- rocksdb_shard.go
- rocksdb_sst.go
Click to show internal directories.
Click to hide internal directories.