Documentation ¶
Overview ¶
Package snapshots provides an interface for managing raft snapshots.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Snapshotter ¶
type Snapshotter interface { // Snapshot returns a new snapshot. Snapshot(ctx context.Context) (raft.FSMSnapshot, error) // Restore restores a snapshot. Restore(ctx context.Context, r io.ReadCloser) error }
Snapshotter is an interface for taking and restoring snapshots.
func New ¶
func New(ctx context.Context, st storage.ConsensusStorage) Snapshotter
New returns a new Snapshotter.
Click to show internal directories.
Click to hide internal directories.