snapshotstate

package
v2.42.5-go-mod+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var List = backend.List

List valid snapshots. Note that the state must be locked by the caller.

Functions

func AutomaticSnapshot

func AutomaticSnapshot(st *state.State, snapName string) (ts *state.TaskSet, err error)

func AutomaticSnapshotExpiration

func AutomaticSnapshotExpiration(st *state.State) (time.Duration, error)

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 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 MockBackendSave

func MockBackendSave(f func(context.Context, uint64, *snap.Info, map[string]interface{}, []string, *backend.Flags) (*client.Snapshot, error)) (restore func())

func Restore

func Restore(st *state.State, setID uint64, snapNames []string, users []string) (snapsFound []string, ts *state.TaskSet, err error)

Restore creates a taskset for restoring a snapshot's data. Note that the state must be locked by the caller.

func Save

func Save(st *state.State, instanceNames []string, users []string) (setID uint64, snapsSaved []string, ts *state.TaskSet, err error)

Save creates a taskset for taking snapshots of snaps' data. Note that the state must be locked by the caller.

Types

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL