Documentation ¶
Index ¶
- Constants
- Variables
- func CRC32(str string) uint32
- func DecodeEntry(buf []byte, crc bool) ([]byte, error)
- func DecodeEntryDetail(buf []byte, crc bool) (uint32, uint32, uint32, uint32, []byte, []byte, error)
- func DecodeEntryHeader(buf []byte) (uint32, uint32, uint32, uint32)
- func DecodeHint(buf []byte) (uint32, uint32, uint32, uint64)
- func MD5(str string) string
- func SHA1(str string) string
- type BFile
- type BFiles
- type BitCask
- type KeyDirs
- type Options
Constants ¶
View Source
const ( // HeaderSize: 4 + 4 + 4 + 4 磁盘源数据域 data /** crc32 : tStamp : ksz : valueSz : key : value 4 : 4 : 4 : 4 : xxxx : xxxx */ HeaderSize = 16 // HintHeaderSize: 4 + 4 + 4 + 8 = 20 byte 内存源数据域 hint /** tstamp : ksz : valuesz : valuePos : key 4 : 4 : 4 : 8 : xxxx */ HintHeaderSize = 20 )
key value endurance
Variables ¶
View Source
var ( ErrNotFound = errors.New("Not Found") ErrIsNotDir = errors.New("This File is not dir") ErrNotReadRoot = errors.New("Can Not Read The Bitcask Root Director") )
Error
View Source
var ErrCrc32 = errors.New("checksumIEEE error")
Functions ¶
func DecodeEntryDetail ¶
func DecodeEntryHeader ¶
DecodeEntryHeader 获取Header基础信息
Types ¶
type BitCask ¶
type BitCask struct { Opts *Options // base config // contains filtered or unexported fields }
BitCask ...
Click to show internal directories.
Click to hide internal directories.