Versions in this module Expand all Collapse all v1 v1.0.4 Jun 30, 2023 v1.0.3 Jun 13, 2023 Changes in this version + const DataFileSuffix + const HintFileSuffix + const MergeFinaFileSuffix + var ErrInvalidCRC = errors.New("InvalidCrcError : invalid crc value, log record maybe corrupted") + func EncodeLogRecord(logrecord *LogRecord) ([]byte, int64) + func EncodeLogRecordPst(pst *LogRecordPst) []byte + func GetDataFileName(dirPath string, fildID uint32) string + type DataFile struct + FileID uint32 + IoManager fio.IOManager + WriteOff int64 + func OpenDataFile(dirPath string, fildID uint32) (*DataFile, error) + func OpenHintFile(dirPath string) (*DataFile, error) + func OpenMergeFinaFile(dirPath string) (*DataFile, error) + func (df *DataFile) Close() error + func (df *DataFile) ReadLogRecord(offset int64) (*LogRecord, int64, error) + func (df *DataFile) Sync() error + func (df *DataFile) Write(buf []byte) error + func (df *DataFile) WriteHintRecord(key []byte, pst *LogRecordPst) error + type LogRecord struct + Key []byte + Type LogRecrdType + Value []byte + type LogRecordHeader struct + type LogRecordPst struct + Fid uint32 + Offset int64 + func DecodeLogRecordPst(buf []byte) *LogRecordPst + type LogRecrdType = byte + const LogRecordDeleted + const LogRecordNormal + const LogRecordTransFinished + type TransactionRecord struct + Pos *LogRecordPst + Record *LogRecord