autorecovery

package
v0.0.0-...-649ed80 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStorageIfAbsent

func CreateStorageIfAbsent(storagePath data.StoragePath) error

func GetBackupName

func GetBackupName() (data.BackupName, error)

func GetState

func GetState(storagePath data.StoragePath) (*state, error)

func NewState

func NewState(storagePath data.StoragePath, lastBackup data.BackupName) *state

Types

type Backup

type Backup struct {
	CreationTime time.Time

	// Version is either Deployment ID (bootc/ostree systems) or version of the MicroShift binary (RPM systems).
	// Used for selecting version-wise compatible backups for restoring.
	Version string
}

func (Backup) Name

func (b Backup) Name() data.BackupName

type Backups

type Backups []Backup

func GetBackups

func GetBackups(storagePath data.StoragePath) (Backups, error)

func (Backups) FilterByVersion

func (bs Backups) FilterByVersion(ver string) Backups

func (Backups) GetMostRecent

func (bs Backups) GetMostRecent() Backup

func (Backups) RemoveBackup

func (bs Backups) RemoveBackup(bb data.BackupName) Backups

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(storage data.StoragePath, saveFailed bool) (*Manager, error)

func (*Manager) PerformRestore

func (m *Manager) PerformRestore() error

Jump to

Keyboard shortcuts

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