Versions in this module Expand all Collapse all v1 v1.0.1 Aug 16, 2019 v1.0.0 Aug 16, 2019 Changes in this version + var ErrCRCMismatch = errors.New("wal: crc mismatch") + var ErrFileNotFound = errors.New("wal: file not found") + var ErrMetadataConflict = errors.New("wal: conflicting metadata found") + var ErrSnapshotMismatch = errors.New("wal: snapshot mismatch") + var ErrSnapshotNotFound = errors.New("wal: snapshot not found") + var SegmentSizeBytes int64 = 64 * 1000 * 1000 + func Exist(dir string) bool + func Repair(lg *zap.Logger, dirpath string) bool + type WAL struct + func Create(lg *zap.Logger, dirpath string, metadata []byte) (*WAL, error) + func Open(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error) + func OpenForRead(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error) + func (w *WAL) Close() error + func (w *WAL) ReadAll() (metadata []byte, state raftpb.HardState, ents []raftpb.Entry, err error) + func (w *WAL) ReleaseLockTo(index uint64) error + func (w *WAL) Save(st raftpb.HardState, ents []raftpb.Entry) error + func (w *WAL) SaveSnapshot(e walpb.Snapshot) error