engine

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EC2      ec2iface.EC2API
	Devices  []string
	Name     string
	Limit    int
	CopyTags bool
}

Config is the engine Config.

type Engine

type Engine struct {
	Config
}

Engine represents a backup engine.

func New

func New(c Config) Engine

New returns a new Engine.

func (*Engine) Run

func (e *Engine) Run() ([]Result, error)

Run runs the backups for all volumes that are matched by the configured `.Name` tag. The method returns a slice of results or an error if backups were not started. If a slice of results is returned each result should be checked for `.Err`.

type Result

type Result struct {
	VolumeID         string
	CreatedSnapshot  string
	DeletedSnapshots []string
	CopiedTags       bool
	Err              error
}

Result represents a backup result.

Jump to

Keyboard shortcuts

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