clean

package
v0.0.0-...-72a07b5 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(c *config.Config) error

Execute performs the needed operations to evaluate which snapshots should be pruned and to prune them

Types

type Disk

type Disk struct {
	// Then name of the disk
	Name string
	// The GCP resource ID of the disk
	ID string
	// The list of snapshots of the disk
	Snapshots []compute.Snapshot
}

Disk is used to store basic information about a disk and its snapshots

func (*Disk) Purgeable

func (d *Disk) Purgeable(rps *rp.RetentionPolicies) []compute.Snapshot

Purgeable returns a list of snapshots that should be purged to complain with the passed retention policies

type Disks

type Disks []Disk

Disks contains an array of disks to be processed

func (*Disks) AddSnapshot

func (ds *Disks) AddSnapshot(s compute.Snapshot)

AddSnapshot allows to add a Snapshot to a Disks collection if the snapshot refers to a disk that is already present in the collection, a snapshot will be added to that disk. If the referred disk is not in the collection, it will be added.

Jump to

Keyboard shortcuts

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