Documentation
¶
Index ¶
Constants ¶
View Source
const ( Bitcask = iota Leveldb )
Variables ¶
View Source
var Options = &KvsOptions{
HostName: "LocalKvs",
Listen: "",
Port: 3000,
Home: "/tmp/kvs",
LockFilename: "kvs.lock",
DataFileSuffix: ".data",
HintFileSuffix: ".hint",
MaxFileSize: 1 << 26,
}
Todo: Sync Strategy, Hint File CRC Check, Merge Policy(https://docs.basho.com/riak/kv/2.0.0/setup/planning/backend/bitcask/#merge-policy)
Functions ¶
This section is empty.
Types ¶
type KvsOptions ¶
type KvsOptions struct {
// Server options
HostName string
Listen string
Port int
// Backend engine type, ref const: Bitcask, Leveldb
EngineType int
// Storage engine options
Home string
DataDir string
DataFileSuffix string
HintFileSuffix string
LockFilename string
MaxFileSize uint64
}
func (*KvsOptions) GetDataFilePath ¶
func (o *KvsOptions) GetDataFilePath(fileId uint32) string
Get data file path e.g. if fileId == 0, {KVS_HOME}/data/000.data
func (*KvsOptions) GetHintFilePath ¶
func (o *KvsOptions) GetHintFilePath(fileId uint32) string
func (*KvsOptions) GetLockFilePath ¶
func (o *KvsOptions) GetLockFilePath() string
Click to show internal directories.
Click to hide internal directories.