Documentation
¶
Index ¶
- func BytesToU32(b []byte) uint32
- func BytesToU32Slice(b []byte) []uint32
- func CompareKeyNoTs(key1, key2 []byte) int
- func CompareKeyWithTs(key1, key2 []byte) int
- func FastRand() uint32
- func IsDeletedOrExpired(meta byte, expiresAt uint64) bool
- func IsDiscardEntry(vlogEntry, lsmEntry *Entry) bool
- func IsValPtr(entry Entry) bool
- func KeyWithTestTs(key []byte, version uint64) []byte
- func KeyWithTs(key []byte) []byte
- func NewCurVersion() uint64
- func ParseKey(key []byte) []byte
- func ParseTsVersion(key []byte) int64
- func RunCallback(back func())
- func SafeCopy(des, src []byte) []byte
- func SameKeyNoTs(src, dst []byte) bool
- func U32SliceToBytes(u32s []uint32) []byte
- func U32ToBytes(v uint32) []byte
- func U64ToBytes(v uint64) []byte
- type Entry
- type EntryHeader
- type HashReader
- type Item
- type Iterator
- type LogEntry
- type Options
- type ValueExt
- type ValuePtr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToU32 ¶
func BytesToU32Slice ¶
func CompareKeyNoTs ¶
CompareKeyNoTs skipList.key() table.biggestKey() block.baseKey()
func CompareKeyWithTs ¶
func IsDeletedOrExpired ¶
func IsDiscardEntry ¶
func KeyWithTestTs ¶
func NewCurVersion ¶
func NewCurVersion() uint64
func ParseTsVersion ¶
func RunCallback ¶
func RunCallback(back func())
func SameKeyNoTs ¶
func U32SliceToBytes ¶
func U32ToBytes ¶
func U64ToBytes ¶
Types ¶
type Entry ¶
type Entry struct { Key []byte Value []byte ExpiresAt uint64 Meta byte Version int64 HeaderLen int Offset uint32 ValThreshold int64 }
Entry db写入的结构体;
func BuildEntry ¶
func BuildEntry() Entry
func (*Entry) EncodeSize ¶
func (*Entry) EstimateSize ¶
func (*Entry) IsDeleteOrExpired ¶
type EntryHeader ¶
func (*EntryHeader) Decode ¶
func (h *EntryHeader) Decode(buf []byte) int
func (*EntryHeader) DecodeFrom ¶
func (h *EntryHeader) DecodeFrom(reader *HashReader) (int, error)
func (EntryHeader) Encode ¶
func (h EntryHeader) Encode(out []byte) int
type HashReader ¶
func NewHashReader ¶
func NewHashReader(read io.Reader) *HashReader
func (*HashReader) ReadByte ¶
func (r *HashReader) ReadByte() (byte, error)
func (*HashReader) Sum32 ¶
func (r *HashReader) Sum32() uint32
Source Files
¶
Click to show internal directories.
Click to hide internal directories.