Documentation ¶
Index ¶
- func GetOrchestrator(name string, orchs Orchestrators) (o orchestrators.Orchestrator, err error)
- func RunCmd(p Provider, o orchestrators.Orchestrator, v *volume.Volume, cmd, cmdKey string) (err error)
- func Start(buildInfo utils.BuildInfo, o orchestrators.Orchestrator, s Server, ...) (err error)
- type Manager
- func (m *Manager) BackupVolume(volumeID string, force bool) (err error)
- func (m *Manager) GetInformations() (informations map[string]string)
- func (m *Manager) RestoreVolume(volumeID string, force bool, snapshotName string) (err error)
- func (m *Manager) RunResticCommand(v *volume.Volume, cmd []string) (output string, err error)
- func (m *Manager) StartServer() (err error)
- type Orchestrators
- type Provider
- type Providers
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrchestrator ¶
func GetOrchestrator(name string, orchs Orchestrators) (o orchestrators.Orchestrator, err error)
GetOrchestrator returns an orchestrator interface based on the name you specified or on the orchestrator Volback is running on
func RunCmd ¶
func RunCmd(p Provider, o orchestrators.Orchestrator, v *volume.Volume, cmd, cmdKey string) (err error)
RunCmd runs a command into a container
func Start ¶
func Start(buildInfo utils.BuildInfo, o orchestrators.Orchestrator, s Server, volumeFilters volume.Filters, providersFile, targetURL, logServer, agentImage string, retryCount int, refreshTime int, parallelCount int) (err error)
Start starts a Volback manager which handle backups management
Types ¶
type Manager ¶
type Manager struct { Orchestrator orchestrators.Orchestrator Volumes []*volume.Volume Server *Server Providers *Providers TargetURL string RetryCount int LogServer string BuildInfo utils.BuildInfo AgentImage string // contains filtered or unexported fields }
Manager contains all informations used by the Volback manager
func (*Manager) BackupVolume ¶
BackupVolume does a backup of a volume
func (*Manager) GetInformations ¶
GetInformations returns informations regarding the Volback manager
func (*Manager) RestoreVolume ¶
RestoreVolume does a restore of a volume
func (*Manager) RunResticCommand ¶
RunResticCommand runs a custom Restic command
func (*Manager) StartServer ¶
StartServer starts the API server
type Orchestrators ¶
type Orchestrators struct { Docker orchestrators.DockerConfig Cattle orchestrators.CattleConfig Kubernetes orchestrators.KubernetesConfig }
Orchestrators groups the parameters of all supported orchestrators in one structure
type Provider ¶
type Provider struct { Name string `toml:"-"` PreCmd string `toml:"pre_cmd"` PostCmd string `toml:"post_cmd"` DetectionCmd string `toml:"detect_cmd"` BackupDir string `toml:"backup_dir"` RestorePostCmd string `toml:"restore_post_cmd"` RestorePreCmd string `toml:"restore_pre_cmd"` }
Provider stores data for one provider
type Providers ¶
Providers stores the list of available providers
func LoadProviders ¶
LoadProviders returns the list of providers from the provider config file
func (*Providers) GetProvider ¶
func (providers *Providers) GetProvider(o orchestrators.Orchestrator, v *volume.Volume) (prov Provider, err error)
GetProvider returns a provider based on detection commands