rotatesnapshot

package module
v0.0.0-...-ac88a99 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: MIT Imports: 10 Imported by: 0

README

rotate-snapshots

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rotate

func Rotate(p Provider) error

Rotate rotate snapshots based on condifured retention policy

func SetVerbose

func SetVerbose(v bool)

SetVerbose set the verbose log falg

Types

type Config

type Config struct {
	Policy   retention `mapstructure:"retention,omitempty"`
	Rotation rotation  `mapstructure:"rotation,omitempty"`
}

Config configuration settings

type GCP

type GCP struct {
	Ctx     context.Context
	Client  *http.Client
	Project string
	Filter  string
}

GCP Google Cloud Provider

func NewGCPProvider

func NewGCPProvider(p, f string) (*GCP, error)

NewGCPProvider Create a Google Cloud Provider

func (*GCP) DeleteSnapshots

func (g *GCP) DeleteSnapshots(s []string) error

DeleteSnapshots Delete Google Cloud Provider snapshots

func (*GCP) ListSnapshots

func (g *GCP) ListSnapshots() ([]Snapshot, error)

ListSnapshots List Google Cloud Provider snapshots

type Provider

type Provider interface {
	ListSnapshots() ([]Snapshot, error)
	DeleteSnapshots(s []string) error
}

Provider interface

type Snapshot

type Snapshot struct {
	Name       string
	CreateTime time.Time
}

Snapshot struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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