volume

package
v0.0.0-...-160a1fa Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filters

type Filters struct {
	Blacklist           []string
	Whitelist           []string
	WhitelistAnnotation bool
}

Filters contains the volumes filters

type Metrics

type Metrics struct {
	LastBackupDate   prometheus.Gauge
	LastBackupStatus prometheus.Gauge
	OldestBackupDate prometheus.Gauge
}

Metrics are used to fill the Prometheus endpoint TODO: Merge LastBackupDate and LastBackupStatus

type MountedVolume

type MountedVolume struct {
	PodID       string
	ContainerID string
	HostID      string
	Volume      *Volume
	Path        string
}

MountedVolume stores mounted volumes inside a container

type Volume

type Volume struct {
	ID         string
	Name       string
	BackupDir  string
	Mount      string
	Mountpoint string
	Driver     string
	Labels     map[string]string
	ReadOnly   bool
	HostBind   string
	Hostname   string
	Namespace  string
	RepoName   string
	SubPath    string

	BackingUp           bool
	LastBackupDate      string
	LastBackupStatus    string
	LastBackupStartDate string
	Logs                map[string]string

	Metrics *Metrics `json:"-"`

	Mux sync.Mutex
}

Volume provides backup methods for a single volume

func (*Volume) CleanupMetrics

func (v *Volume) CleanupMetrics()

CleanupMetrics cleans up volume's metrics

func (*Volume) SetupMetrics

func (v *Volume) SetupMetrics()

SetupMetrics initializes the volume's metrics

Jump to

Keyboard shortcuts

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