lightsail

package
v0.0.0-...-ebde46d Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

type Opt func(*SnapshotManager)

Opt represents Options that can be passed to the SnapshotManager

func WithRetention

func WithRetention(r time.Duration) Opt

WithRetention set the retention duration

func WithSnapshotSuffix

func WithSnapshotSuffix(suf string) Opt

WithSnapshotSuffix sets the suffix of the automated snapshots

type SnapshotManager

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

SnapshotManager manages the snapshots of a single lightsail instance

func NewSnapshotManager

func NewSnapshotManager(client *lightsail.Lightsail, instance string, opts ...Opt) *SnapshotManager

NewSnapshotManager creates a new SnapshotManager for an instance given an lightsail client and a set of Opts

func (*SnapshotManager) Prune

func (smgr *SnapshotManager) Prune(ctx context.Context) error

Prune deletes old snapshots of the lightsail instance belonging to the SnapshotManager

func (*SnapshotManager) Snapshot

func (smgr *SnapshotManager) Snapshot(ctx context.Context) error

Snapshot creates a snapshots for the Lightsail instance this SnapshotManager belongs to

Jump to

Keyboard shortcuts

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