Documentation
¶
Index ¶
- func EncodeLogRecord(log *LogRecord) ([]byte, int64)
- func EncodeLogRecordPos(pos *LogPos) []byte
- func GetDataFileName(dirPath string, fileId uint32) string
- func GetLogRecordCRC(lr *LogRecord, header []byte) uint32
- type DataFile
- type DataType
- type LogPos
- type LogRecord
- type LogRecordHeader
- type LogRecordType
- type TxRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeLogRecord ¶
func EncodeLogRecordPos ¶
EncodeLogRecordPos encode the pos info
func GetDataFileName ¶
func GetLogRecordCRC ¶
Types ¶
type DataFile ¶
type DataFile struct { FileId uint32 WriteOff int64 Writer driver.IOManager Reader driver.IOManager }
func OpenDataFile ¶
OpenDataFile Open new datafile
func OpenHintFile ¶
OpenHintFile Open new datafile
func OpenMergeFinishedFile ¶
OpenMergeFinishedFile Open new datafile
func (*DataFile) ReadLogRecord ¶
type LogRecord ¶
type LogRecord struct { Key []byte Value []byte Type LogRecordType DataType DataType Expiration int64 }
type LogRecordHeader ¶
type LogRecordHeader struct { RecordType LogRecordType DataType DataType KeySize uint32 ValueSize uint32 Expiration int64 // contains filtered or unexported fields }
func DecodeLogRecordHeader ¶
func DecodeLogRecordHeader(buf []byte) (*LogRecordHeader, int64)
type LogRecordType ¶
type LogRecordType = byte
const ( LogRecordNormal LogRecordType = iota LogRecordDeleted LogRecordTxnCommit LogRecordTxnRollback LogRecordTxnBegin )
Click to show internal directories.
Click to hide internal directories.