Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snapshot ¶
type Snapshot struct {
raftpb.SnapshotState
Data io.ReadCloser
}
Snapshot is the state of a system at a particular point in time.
type Snapshotter ¶
type Snapshotter interface {
Writer(uint64, uint64) (io.WriteCloser, error)
Reader(uint64, uint64) (io.ReadCloser, error)
Write(*Snapshot) error
Read(uint64, uint64) (*Snapshot, error)
ReadFrom(string) (*Snapshot, error)
}
Snapshotter define a set of functions to read and write snapshots.
type Storage ¶
type Storage interface {
SaveSnapshot(etcdraftpb.Snapshot) error
SaveEntries(etcdraftpb.HardState, []etcdraftpb.Entry) error
Snapshotter() Snapshotter
Boot([]byte) ([]byte, etcdraftpb.HardState, []etcdraftpb.Entry, *Snapshot, error)
Exist() bool
Close() error
}
Storage define a set of functions to persist raft data, To provide durability and ensure data integrity.
Click to show internal directories.
Click to hide internal directories.