Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { storage.KVStore storage.Backupable storage.ChangePropagator storage.ChangeApplier }
DB interface represents the capabilities exposed by the underlying implmentation based on RocksDB engine.
type DBOption ¶
type DBOption func(*rocksDBOpts)
DBOption is used to configure the RocksDB storage engine.
func WithCacheSize ¶
WithCacheSize is used to set the block cache size.
func WithLogger ¶
WithLogger is used to inject a ZAP logger instance.
func WithRocksDBConfig ¶
WithRocksDBConfig can be used to override internal RocksDB storage settings through the given .ini file.
func WithSSTDir ¶
WithSSTDir configures the directory to be used for SST Operation on RocksDB.
func WithSyncWrites ¶
func WithSyncWrites() DBOption
WithSyncWrites ensures all writes to RocksDB are immediatey flushed to disk from OS buffers.
type WriteBatchIterator ¶
type WriteBatchIterator struct {
// contains filtered or unexported fields
}
WriteBatchIterator represents a iterator to iterator over records.
func NewWriteBatchIterator ¶
func NewWriteBatchIterator(wbData []byte) *WriteBatchIterator
NewWriteBatchIterator creates a new write batch iterator initialised with the given write batch data byte array.
func (*WriteBatchIterator) Error ¶
func (iter *WriteBatchIterator) Error() error
Error returns the error if the iteration is failed.
func (*WriteBatchIterator) Next ¶
func (iter *WriteBatchIterator) Next() bool
Next returns the next record. Returns false if no further record exists.
func (*WriteBatchIterator) Record ¶
func (iter *WriteBatchIterator) Record() *gorocksdb.WriteBatchRecord
Record returns the current record.