Versions in this module Expand all Collapse all v0 v0.3.0 Aug 16, 2021 Changes in this version + const BufferSizeBytesDefault + const FileSizeBytesDefault + var ErrCRC = errors.New("wal: crc verification failed") + var ErrReadOnly = errors.New("wal: in READ mode") + var ErrWALAlreadyExists = errors.New("wal: is already exists") + var ErrWriteOnly = errors.New("wal: in WRITE mode") + func Repair(logger api.Logger, dirPath string) error + type LogRecordCRC uint32 + type LogRecordHeader uint64 + type LogRecordLength uint32 + type LogRecordReader struct + func NewLogRecordReader(logger api.Logger, fileName string) (*LogRecordReader, error) + func (r *LogRecordReader) CRC() uint32 + func (r *LogRecordReader) Close() error + func (r *LogRecordReader) Read() (*protos.LogRecord, error) + type Options struct + BufferSizeBytes int64 + FileSizeBytes int64 + func DefaultOptions() *Options + func (o *Options) String() string + type WriteAheadLogFile struct + func Create(logger api.Logger, dirPath string, options *Options) (*WriteAheadLogFile, error) + func InitializeAndReadAll(logger api.Logger, walDir string, options *Options) (writeAheadLog *WriteAheadLogFile, initialState [][]byte, err error) + func Open(logger api.Logger, dirPath string, options *Options) (*WriteAheadLogFile, error) + func (w *WriteAheadLogFile) Append(data []byte, truncateTo bool) error + func (w *WriteAheadLogFile) CRC() uint32 + func (w *WriteAheadLogFile) Close() error + func (w *WriteAheadLogFile) ReadAll() ([][]byte, error) + func (w *WriteAheadLogFile) TruncateTo() error Incompatible versions in this module v2.3.0+incompatible Aug 16, 2021 Other modules containing this package github.com/SmartBFT-Go/consensus/v2