Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrowRestore ¶
type FileSnapshotSink ¶
type FileSnapshotSink struct {
// contains filtered or unexported fields
}
FileSnapshotSink implements SnapshotSink with a file.
func (*FileSnapshotSink) Cancel ¶
func (s *FileSnapshotSink) Cancel() error
Cancel is used to indicate an unsuccessful end.
func (*FileSnapshotSink) Close ¶
func (s *FileSnapshotSink) Close() error
Close is used to indicate a successful end.
func (*FileSnapshotSink) ID ¶
func (s *FileSnapshotSink) ID() string
ID returns the ID of the snapshot, can be used with Open() after the snapshot is finalized.
type Persist ¶
type Persist interface {
Persist(f lsm.CompactCallback)
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the SnapshotStore interface and allows snapshots to be made on the local disk.
func New ¶
New creates a new FileSnapshotStore based on a base directory. The `retain` parameter controls how many snapshots are retained. Must be at least 1.
func (*Store) Create ¶
func (f *Store) Create(version raft.SnapshotVersion, index, term uint64, configuration raft.Configuration, configurationIndex uint64, trans raft.Transport) (raft.SnapshotSink, error)
Create is used to start a new snapshot
func (*Store) List ¶
func (f *Store) List() ([]*raft.SnapshotMeta, error)
List returns available snapshots in the store.
func (*Store) Open ¶
func (f *Store) Open(id string) (*raft.SnapshotMeta, io.ReadCloser, error)
Open takes a snapshot ID and returns a ReadCloser for that snapshot.
func (*Store) ReapSnapshots ¶
ReapSnapshots reaps any snapshots beyond the retain count.