Documentation
¶
Index ¶
Constants ¶
View Source
const ( Name = "originium" Version = "v0.2.1" )
Variables ¶
View Source
var ( ErrMkDir = errors.New("failed to create db dir") ErrDBClosed = errors.New("db closed") )
View Source
var ( ErrReadOnlyTxn = errors.New("transaction is read-only") ErrDiscardedTxn = errors.New("transaction has been discarded") ErrConflictTxn = errors.New("transaction has a conflict") ErrEmptyKey = errors.New("key is empty") )
View Source
var DefaultConfig = Config{
SkipListMaxLevel: 9,
SkipListP: 0.5,
MemtableByteThreshold: 4 * _mb,
ImmutableBuffer: 10,
DataBlockByteThreshold: 4 * _kb,
L0TargetNum: 5,
LevelRatio: 10,
FileMode: 0755,
}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// SkipList Config
SkipListMaxLevel int
SkipListP float64
// Memtable Config
// memtable size threshold of turning to an immutable memtable
MemtableByteThreshold int
ImmutableBuffer int
// SSTable Config
DataBlockByteThreshold int
// Level Config
L0TargetNum int
LevelRatio int
FileMode os.FileMode
}
Click to show internal directories.
Click to hide internal directories.
