Documentation
¶
Index ¶
- func BuildTagArgs(tagList []string) []string
- func NewExecutor(config job.Config) queue.Executor
- type ArchiveExecutor
- func (*ArchiveExecutor) Exclusive() bool
- func (a *ArchiveExecutor) Execute() error
- func (a *ArchiveExecutor) GetConcurrencyLimit() int
- func (g *ArchiveExecutor) GetJobNamespace() string
- func (g *ArchiveExecutor) GetJobType() v1alpha1.JobType
- func (g *ArchiveExecutor) GetRepository() string
- func (g *ArchiveExecutor) Logger() logr.Logger
- type BackupExecutor
- func (*BackupExecutor) Exclusive() bool
- func (b *BackupExecutor) Execute() error
- func (b *BackupExecutor) GetConcurrencyLimit() int
- func (g *BackupExecutor) GetJobNamespace() string
- func (g *BackupExecutor) GetJobType() v1alpha1.JobType
- func (g *BackupExecutor) GetRepository() string
- func (g *BackupExecutor) Logger() logr.Logger
- type CheckExecutor
- func (*CheckExecutor) Exclusive() bool
- func (c *CheckExecutor) Execute() error
- func (c *CheckExecutor) GetConcurrencyLimit() int
- func (g *CheckExecutor) GetJobNamespace() string
- func (g *CheckExecutor) GetJobType() v1alpha1.JobType
- func (g *CheckExecutor) GetRepository() string
- func (g *CheckExecutor) Logger() logr.Logger
- type EnvVarConverter
- type PruneExecutor
- func (p *PruneExecutor) Exclusive() bool
- func (p *PruneExecutor) Execute() error
- func (p *PruneExecutor) GetConcurrencyLimit() int
- func (g *PruneExecutor) GetJobNamespace() string
- func (g *PruneExecutor) GetJobType() v1alpha1.JobType
- func (g *PruneExecutor) GetRepository() string
- func (g *PruneExecutor) Logger() logr.Logger
- type QueueWorker
- type RestoreExecutor
- func (*RestoreExecutor) Exclusive() bool
- func (r *RestoreExecutor) Execute() error
- func (r *RestoreExecutor) GetConcurrencyLimit() int
- func (g *RestoreExecutor) GetJobNamespace() string
- func (g *RestoreExecutor) GetJobType() v1alpha1.JobType
- func (g *RestoreExecutor) GetRepository() string
- func (g *RestoreExecutor) Logger() logr.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTagArgs ¶
BuildTagArgs will prepend "--tag " to every element in the given []string
Types ¶
type ArchiveExecutor ¶
type ArchiveExecutor struct {
// contains filtered or unexported fields
}
ArchiveExecutor will execute the batch.job for archive.
func NewArchiveExecutor ¶
func NewArchiveExecutor(config job.Config) *ArchiveExecutor
NewArchiveExecutor will return a new executor for archive jobs.
func (*ArchiveExecutor) Execute ¶
func (a *ArchiveExecutor) Execute() error
Execute creates the actual batch.job on the k8s api.
func (*ArchiveExecutor) GetConcurrencyLimit ¶
func (a *ArchiveExecutor) GetConcurrencyLimit() int
GetConcurrencyLimit returns the concurrent jobs limit
func (*ArchiveExecutor) GetJobNamespace ¶
func (g *ArchiveExecutor) GetJobNamespace() string
func (*ArchiveExecutor) GetJobType ¶
func (*ArchiveExecutor) GetRepository ¶
func (g *ArchiveExecutor) GetRepository() string
type BackupExecutor ¶
type BackupExecutor struct {
// contains filtered or unexported fields
}
BackupExecutor creates a batch.job object on the cluster. It merges all the information provided by defaults and the CRDs to ensure the backup has all information to run.
func NewBackupExecutor ¶
func NewBackupExecutor(config job.Config) *BackupExecutor
NewBackupExecutor returns a new BackupExecutor.
func (*BackupExecutor) Execute ¶
func (b *BackupExecutor) Execute() error
Execute triggers the actual batch.job creation on the cluster. It will also register a callback function on the observer so the prebackup pods can be removed after the backup has finished.
func (*BackupExecutor) GetConcurrencyLimit ¶
func (b *BackupExecutor) GetConcurrencyLimit() int
GetConcurrencyLimit returns the concurrent jobs limit
func (*BackupExecutor) GetJobNamespace ¶
func (g *BackupExecutor) GetJobNamespace() string
func (*BackupExecutor) GetJobType ¶
func (*BackupExecutor) GetRepository ¶
func (g *BackupExecutor) GetRepository() string
type CheckExecutor ¶
type CheckExecutor struct {
// contains filtered or unexported fields
}
CheckExecutor will execute the batch.job for checks.
func NewCheckExecutor ¶
func NewCheckExecutor(config job.Config) *CheckExecutor
NewCheckExecutor will return a new executor for check jobs.
func (*CheckExecutor) Exclusive ¶
func (*CheckExecutor) Exclusive() bool
Exclusive should return true for jobs that can't run while other jobs run.
func (*CheckExecutor) Execute ¶
func (c *CheckExecutor) Execute() error
Execute creates the actual batch.job on the k8s api.
func (*CheckExecutor) GetConcurrencyLimit ¶
func (c *CheckExecutor) GetConcurrencyLimit() int
GetConcurrencyLimit returns the concurrent jobs limit
func (*CheckExecutor) GetJobNamespace ¶
func (g *CheckExecutor) GetJobNamespace() string
func (*CheckExecutor) GetJobType ¶
func (*CheckExecutor) GetRepository ¶
func (g *CheckExecutor) GetRepository() string
type EnvVarConverter ¶
type EnvVarConverter struct {
Vars map[string]envVarEntry
}
EnvVarConverter can convert the given map to a []corev1.EnvVar. It also provides a function to merge another EnvVarConverter instance into itself. The merge will overwrite all zero-valued or nor declared entries.
func DefaultEnv ¶
func DefaultEnv(namespace string) EnvVarConverter
DefaultEnv returns an environment that contains the default values for the fields.
func NewEnvVarConverter ¶
func NewEnvVarConverter() EnvVarConverter
NewEnvVarConverter returns a new
func (*EnvVarConverter) Convert ¶
func (e *EnvVarConverter) Convert() []corev1.EnvVar
Convert returns a ready-to-use []corev1.EnvVar where all the key value pairs have been added according to their type. If string and envVarSource are set the string will have precedence.
func (*EnvVarConverter) Merge ¶
func (e *EnvVarConverter) Merge(source EnvVarConverter) error
Merge will merge the source into the instance. If there's no entry in the instance that exists in the source, the source entry will be added. If there's a zero-valued entry, it will also be overwritten.
func (*EnvVarConverter) SetEnvVarSource ¶
func (e *EnvVarConverter) SetEnvVarSource(key string, value *corev1.EnvVarSource)
SetEnvVarSource add an EnvVarSource to the environment with the given key.
func (*EnvVarConverter) SetString ¶
func (e *EnvVarConverter) SetString(key, value string)
SetString adds a string key and value pair to the environment.
type PruneExecutor ¶
type PruneExecutor struct {
// contains filtered or unexported fields
}
PruneExecutor will execute the batch.job for Prunes.
func NewPruneExecutor ¶
func NewPruneExecutor(config job.Config) *PruneExecutor
NewPruneExecutor will return a new executor for Prune jobs.
func (*PruneExecutor) Exclusive ¶
func (p *PruneExecutor) Exclusive() bool
Exclusive should return true for jobs that can't run while other jobs run.
func (*PruneExecutor) Execute ¶
func (p *PruneExecutor) Execute() error
Execute creates the actual batch.job on the k8s api.
func (*PruneExecutor) GetConcurrencyLimit ¶
func (p *PruneExecutor) GetConcurrencyLimit() int
GetConcurrencyLimit returns the concurrent jobs limit
func (*PruneExecutor) GetJobNamespace ¶
func (g *PruneExecutor) GetJobNamespace() string
func (*PruneExecutor) GetJobType ¶
func (*PruneExecutor) GetRepository ¶
func (g *PruneExecutor) GetRepository() string
type QueueWorker ¶
type QueueWorker struct {
// contains filtered or unexported fields
}
QueueWorker is the object responsible for iterating the job queue and triggering the execution of the jobs.
func GetExecutor ¶
func GetExecutor() *QueueWorker
GetExecutor will return the singleton instance for the executor.
type RestoreExecutor ¶
type RestoreExecutor struct {
// contains filtered or unexported fields
}
func NewRestoreExecutor ¶
func NewRestoreExecutor(config job.Config) *RestoreExecutor
NewRestoreExecutor will return a new executor for Restore jobs.
func (*RestoreExecutor) Execute ¶
func (r *RestoreExecutor) Execute() error
Execute creates the actual batch.job on the k8s api.
func (*RestoreExecutor) GetConcurrencyLimit ¶
func (r *RestoreExecutor) GetConcurrencyLimit() int
GetConcurrencyLimit returns the concurrent jobs limit
func (*RestoreExecutor) GetJobNamespace ¶
func (g *RestoreExecutor) GetJobNamespace() string
func (*RestoreExecutor) GetJobType ¶
func (*RestoreExecutor) GetRepository ¶
func (g *RestoreExecutor) GetRepository() string