Versions in this module Expand all Collapse all v0 v0.0.1 Mar 23, 2015 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") + func Exist(dirpath string) bool + func MultiReadCloser(readClosers ...io.ReadCloser) io.ReadCloser + type WAL struct + func Create(dirpath string, metadata []byte) (*WAL, error) + func Open(dirpath string, snap walpb.Snapshot) (*WAL, error) + func OpenNotInUse(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 + type WalVersion string + const WALNotExist + const WALUnknown + const WALv0_4 + const WALv2_0 + const WALv2_0Proxy + const WALv2_0_1 + func DetectVersion(dirpath string) (WalVersion, error)