Versions in this module Expand all Collapse all v1 v1.0.0 Jan 8, 2021 Changes in this version + var ErrCRCMismatch = errors.New("snap: crc mismatch") + var ErrEmptySnapshot = errors.New("snap: empty snapshot") + var ErrNoDBSnapshot = errors.New("snap: snapshot file doesn't exist") + var ErrNoSnapshot = errors.New("snap: no available snapshot") + func Read(snapname string) (*raftpb.Snapshot, error) + type Message struct + ReadCloser io.ReadCloser + TotalSize int64 + func NewMessage(rs raftpb.Message, rc io.ReadCloser, rcSize int64) *Message + func (m Message) CloseNotify() <-chan bool + func (m Message) CloseWithError(err error) + type SnapshotSaver interface + SaveFromRemote func(r io.Reader, id uint64, msg raftpb.Message) (int64, error) + type Snapshotter struct + func New(dir string) *Snapshotter + func (s *Snapshotter) DBFilePath(id uint64) (string, error) + func (s *Snapshotter) Load() (*raftpb.Snapshot, error) + func (s *Snapshotter) SaveDBFrom(r io.Reader, id uint64) (int64, error) + func (s *Snapshotter) SaveFromRemote(r io.Reader, id uint64, msg raftpb.Message) (int64, error) + func (s *Snapshotter) SaveSnap(snapshot raftpb.Snapshot) error Incompatible versions in this module v3.3.27+incompatible Aug 25, 2020 v2.3.8+incompatible Feb 16, 2017