Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeValue(buf []byte, verify bool) (v []byte, err error)
- func EncodeValue(v []byte) []byte
- func NewCachedMutcask(cache_num int, opts ...Option) (*cachedMutcask, error)
- func NewLevedbKV(dir string) (*levedbKV, error)
- func NewMutcask(opts ...Option) (*mutcask, error)
- type Cask
- type CaskMap
- type Config
- type Hint
- type HintLV
- type KVDB
- type KeyMap
- type Option
Constants ¶
View Source
const (
HintDeletedFlag = byte(1)
)
View Source
const HintEncodeSize = HintKeySize + 8 + 4
HintKeySize + 8 bytes value offset + 4 bytes value size
View Source
const HintKeySize = MaxKeySize + 1 + 1
max key size 128 byte + 1 byte which record the key size + 1 byte delete flag
View Source
const MAX_PARALLEL_READ = 56
View Source
const MaxKeySize = 128
Variables ¶
View Source
var ( ErrNone = xerrors.New("mutcask: error none") ErrValueFormat = xerrors.New("mutcask: invalid value format") ErrDataRotted = xerrors.New("mutcask: data may be rotted") ErrKeySizeTooLong = xerrors.New("mutcask: key size is too long") ErrHintFormat = xerrors.New("mutcask: invalid hint format") ErrPathUndefined = xerrors.New("mutcask: should define path within config") ErrPath = xerrors.New("mutcask: path should be directory not file") ErrHintLogBroken = xerrors.New("mutcask: hint log broken") ErrReadHintBeyondRange = xerrors.New("mutcask: read hint out of file range") ErrRepoLocked = xerrors.New("mutcask: repo has been locked") )
View Source
var ErrNotFound = xerrors.New("kv: key not found")
Functions ¶
func NewCachedMutcask ¶ added in v0.1.1
func NewLevedbKV ¶ added in v0.0.4
func NewMutcask ¶
Types ¶
type HintLV ¶ added in v0.1.0
func HintLVFromBytes ¶ added in v0.1.0
type KVDB ¶
type Option ¶
type Option func(cfg *Config)
func CaskNumConf ¶
func HintBootReadNumConf ¶
func MaxParallelReadConf ¶ added in v0.2.7
func MigrateConf ¶ added in v0.1.0
func MigrateConf() Option
Click to show internal directories.
Click to hide internal directories.