Documentation ¶
Index ¶
- Variables
- func AutomaticSnapshot(st *state.State, snapName string) (ts *state.TaskSet, err error)
- func AutomaticSnapshotExpiration(st *state.State) (time.Duration, error)
- func Check(st *state.State, setID uint64, snapNames []string, users []string) (snapsFound []string, ts *state.TaskSet, err error)
- func EstimateSnapshotSize(st *state.State, instanceName string, users []string) (uint64, error)
- func Forget(st *state.State, setID uint64, snapNames []string) (snapsFound []string, ts *state.TaskSet, err error)
- func Import(ctx context.Context, st *state.State, r io.Reader) (setID uint64, snapNames []string, err error)
- func List(ctx context.Context, st *state.State, setID uint64, snapNames []string) ([]client.SnapshotSet, error)
- func MockBackendSave(...) (restore func())
- func Restore(st *state.State, setID uint64, snapNames []string, users []string) (snapsFound []string, ts *state.TaskSet, err error)
- func Save(st *state.State, instanceNames []string, users []string) (setID uint64, snapsSaved []string, ts *state.TaskSet, err error)
- type SnapshotExport
- type SnapshotManager
Constants ¶
This section is empty.
Variables ¶
View Source
var Export = backend.NewSnapshotExport
Export exports a given snapshot ID Note that the state much be locked by the caller.
Functions ¶
func AutomaticSnapshot ¶
func Check ¶
func Check(st *state.State, setID uint64, snapNames []string, users []string) (snapsFound []string, ts *state.TaskSet, err error)
Check creates a taskset for checking a snapshot's data. Note that the state must be locked by the caller.
func EstimateSnapshotSize ¶
func Forget ¶
func Forget(st *state.State, setID uint64, snapNames []string) (snapsFound []string, ts *state.TaskSet, err error)
Forget creates a taskset for deletinig a snapshot. Note that the state must be locked by the caller.
func Import ¶
func Import(ctx context.Context, st *state.State, r io.Reader) (setID uint64, snapNames []string, err error)
Import a given snapshot ID from an exported snapshot
func List ¶
func List(ctx context.Context, st *state.State, setID uint64, snapNames []string) ([]client.SnapshotSet, error)
List valid snapshots. Note that the state must be locked by the caller.
func MockBackendSave ¶
Types ¶
type SnapshotExport ¶
type SnapshotExport = backend.SnapshotExport
SnapshotExport provides a snapshot export that can be streamed out
type SnapshotManager ¶
type SnapshotManager struct {
// contains filtered or unexported fields
}
SnapshotManager takes snapshots of active snaps
func Manager ¶
func Manager(st *state.State, runner *state.TaskRunner) *SnapshotManager
Manager returns a new SnapshotManager
func (*SnapshotManager) Ensure ¶
func (mgr *SnapshotManager) Ensure() error
Ensure is part of the overlord.StateManager interface.
func (*SnapshotManager) StartUp ¶
func (mgr *SnapshotManager) StartUp() error
Click to show internal directories.
Click to hide internal directories.