Versions in this module Expand all Collapse all v0 v0.1.0 Jun 17, 2020 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(dirpath string) bool + func Repair(dirpath string) bool + func Verify(walDir string, snap walpb.Snapshot) error + type WAL struct + func Create(dirpath string, metadata []byte) (*WAL, error) + func Open(dirpath string, snap walpb.Snapshot) (*WAL, error) + func OpenForRead(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