Versions in this module Expand all Collapse all v3 v3.0.1 Dec 26, 2023 Changes in this version + const ArchivingBlockFileName + const ArchivingPath + const ArchivingResultFileName + const BakFileSuffix + const BlockFilenameTemplate + const DBFileNameLen + const DBFileSuffix + const LastFileSuffix + const MergingFileSuffix + const RestoringIndexFileName + const RestoringPath + var ErrArchivedBlock = errors.New("archived block") + var ErrArchivedRWSet = errors.New("archived RWSet") + var ErrArchivedTx = errors.New("archived transaction") + var ErrConfigBlockArchive = errors.New("config block do not need archive") + var ErrInvalidateRestoreBlocks = errors.New("invalidate restore blocks") + func AppendChecksum(dst []byte, checksum uint32) []byte + func AppendFileEntry(data []byte, fw *FileWriter, dataSize int, logger protocol.Logger) error + func AppendUvarint(dst []byte, x uint64) []byte + func CheckSegmentName(name string) bool + func CopyThenRemoveFile(src, dst string, srcf *os.File) error + func FileIndexToString(fiIndex *storePb.StoreInfo) string + func LoadNextBinaryEntry(data []byte) (n, prefixLen int, err error) + func SegmentIndexPath(name, path string) string + func SegmentNameToUint64(fileName string) (uint64, error) + func SegmentPath(name, path string) string + func Uint64ToSegmentName(index uint64) string + type Bpos struct + End int + Pos int + PrefixLen int + func AppendBinaryEntry(dst []byte, data []byte) (out []byte, epos Bpos) + func LoadEntriesForRestarting(path string) ([]byte, []Bpos, error) + func LoadSegmentEntriesForRestarting(path string, index uint64) ([]byte, []Bpos, error) + type CRC uint32 + func NewCRC(b []byte) CRC + func (c CRC) Update(b []byte) CRC + func (c CRC) Value() uint32 + type FileWriter struct + Ebuf []byte + Epos []Bpos + Lfile *LockableFile + Path string + func NewFileWriter(path string) (*FileWriter, error) + type IndexPair struct + Key []byte + Value []byte + type LockableFile struct + Rfile *os.File + Wfile lwsf.WalFile + func OpenWriteFile(path, fileSuffix string, useMmap bool, segSize int, log protocol.Logger) (*LockableFile, error) + type SegIndex struct + BIndex *serialization.BlockIndexMeta + Height uint64 + func LoadArchiveSegIndex(fw *FileWriter) ([]*SegIndex, error) + type SegName struct + Index uint64 + IsTmp bool + Name string Other modules containing this package chainmaker.org/chainmaker/store/v2