volume

package
v1.0.0-alpha0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2018 License: Apache-2.0 Imports: 11 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Engine          string `label:"engine" ini:"engine" config:"Engine"`
	NoVerify        bool   `label:"no_verify" ini:"no_verify" config:"NoVerify"`
	Ignore          bool   `label:"ignore" ini:"ignore" default:"false"`
	TargetURL       string `label:"target_url" ini:"target_url" config:"TargetURL"`
	RemoveOlderThan string `label:"remove_older_than" ini:"remove_older_than" config:"RemoveOlderThan"`

	Duplicity struct {
		FullIfOlderThan string `label:"full_if_older_than" ini:"full_if_older_than" config:"FullIfOlderThan"`
	} `label:"duplicity" ini:"duplicity" config:"Duplicity"`

	RClone struct {
	} `label:"rclone" ini:"rclone" config:"RClone"`

	Restic struct {
	} `label:"restic" ini:"restic" config:"Restic"`
}

Config is the volume's configuration parameters

type MountedVolumes

type MountedVolumes struct {
	PodID       string
	ContainerID string
	HostID      string
	Volumes     map[string]string
}

MountedVolumes stores mounted volumes inside a container

type Volume

type Volume struct {
	Name           string
	Target         string
	BackupDir      string
	Mount          string
	Mountpoint     string
	Driver         string
	Labels         map[string]string
	LabelPrefix    string
	ReadOnly       bool
	Config         *Config
	MetricsHandler *metrics.PrometheusMetrics
	HostBind       string
}

Volume provides backup methods for a single Docker volume

func NewVolume

func NewVolume(v *Volume, c *config.Config, h string) *Volume

NewVolume returns a new Volume for a given types.Volume struct

func (*Volume) LogTime

func (v *Volume) LogTime(event string) (err error)

LogTime adds a new metric even with the current time

Jump to

Keyboard shortcuts

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