rocksdb

package
v0.0.0-...-d34d8e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BlockSize       int `toml:"block_size"`
	CacheSize       int `toml:"cache_size"`
	WriteBufferSize int `toml:"write_buffer_size"`
	MaxOpenFiles    int `toml:"max_open_files"`
	NumLevels       int `toml:"num_levels"`

	BloomFilterSize               int `toml:"bloom_filter_size"`
	BackgroundThreads             int `toml:"background_threads"`
	HighPriorityBackgroundThreads int `toml:"high_priority_background_threads"`
	MaxBackgroundCompactions      int `toml:"max_background_compactions"`
	MaxBackgroundFlushes          int `toml:"max_background_flushes"`

	MaxWriteBufferNumber           int `toml:"max_write_buffer_number"`
	MinWriteBufferNumberToMerge    int `toml:"min_write_buffer_number_to_merge"`
	Level0FileNumCompactionTrigger int `toml:"level0_filenum_compaction_trigger"`
	Level0SlowdownWritesTrigger    int `toml:"level0_slowdown_writes_trigger"`
	Level0StopWritesTrigger        int `toml:"level0_stop_writes_trigger"`
	TargetFileSizeBase             int `toml:"target_file_size_base"`
	TargetFileSizeMultiplier       int `toml:"target_file_size_multiplier"`
	MaxBytesForLevelBase           int `toml:"max_bytes_for_level_base"`
	MaxBytesForLevelMultiplier     int `toml:"max_bytes_for_level_multiplier"`

	DisableAutoCompactions bool `toml:"disable_auto_compations"`
	DisableDataSync        bool `toml:"disable_data_sync"`
	UseFsync               bool `toml:"use_fsync"`
	SnapshotFillCache      bool `toml:"snapshot_fillcache"`
	AllowOSBuffer          bool `toml:"allow_os_buffer"`
}

func NewDefaultConfig

func NewDefaultConfig() *Config

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

func (*Iterator) Close

func (it *Iterator) Close()

func (*Iterator) Error

func (it *Iterator) Error() error

func (*Iterator) Key

func (it *Iterator) Key() []byte

func (*Iterator) Next

func (it *Iterator) Next()

func (*Iterator) Prev

func (it *Iterator) Prev()

func (*Iterator) SeekTo

func (it *Iterator) SeekTo(key []byte) []byte

func (*Iterator) SeekToFirst

func (it *Iterator) SeekToFirst()

func (*Iterator) SeekToLast

func (it *Iterator) SeekToLast()

func (*Iterator) Valid

func (it *Iterator) Valid() bool

func (*Iterator) Value

func (it *Iterator) Value() []byte

type RocksDB

type RocksDB struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string, conf *Config, repair bool) (*RocksDB, error)

func (*RocksDB) Clear

func (db *RocksDB) Clear() error

func (*RocksDB) Close

func (db *RocksDB) Close()

func (*RocksDB) Commit

func (db *RocksDB) Commit(bt *engine.Batch) error

func (*RocksDB) Compact

func (db *RocksDB) Compact(start, limit []byte) error

func (*RocksDB) Get

func (db *RocksDB) Get(key []byte) ([]byte, error)

func (*RocksDB) NewIterator

func (db *RocksDB) NewIterator() engine.Iterator

func (*RocksDB) NewSnapshot

func (db *RocksDB) NewSnapshot() engine.Snapshot

func (*RocksDB) Stats

func (db *RocksDB) Stats() string

type Snapshot

type Snapshot struct {
	// contains filtered or unexported fields
}

func (*Snapshot) Close

func (sp *Snapshot) Close()

func (*Snapshot) Get

func (sp *Snapshot) Get(key []byte) ([]byte, error)

func (*Snapshot) NewIterator

func (sp *Snapshot) NewIterator() engine.Iterator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL