Documentation ¶
Index ¶
- Variables
- func CreateBackupAction(sentryClient libsentry.Client, backupExectuor BackupExectuor, ...) run.Runnable
- func CreateBackupCron(sentryClient libsentry.Client, backupExectuor BackupExectuor, ...) run.Func
- func CreateSetupResourceDefinition(kubeConfig string, namespace k8s.Namespace, trigger run.Fire) func(ctx context.Context) error
- func NewBackupAction(sentryClient libsentry.Client, k8sConnector K8sConnector, ...) run.Runnable
- type BackupExectuor
- func CreateBackupExectuor(currentTimeGetter libtime.CurrentTimeGetter, backupRootDirectory Path, ...) BackupExectuor
- func NewBackupExectuor(currentTimeGetter libtime.CurrentTimeGetter, rsyncExectuor RsyncExectuor, ...) BackupExectuor
- func NewBackupExectuorOnlyOnce(backupExectuor BackupExectuor) BackupExectuor
- type K8sConnector
- type Path
- type Paths
- type RsyncExectuor
- type SSHPrivateKey
Constants ¶
This section is empty.
Variables ¶
View Source
var AlreadyRunningError = stderrors.New("backup already running")
Functions ¶
func CreateBackupAction ¶
func CreateBackupCron ¶
func CreateBackupCron( sentryClient libsentry.Client, backupExectuor BackupExectuor, kubeConfig string, namespace k8s.Namespace, cronExpression libcron.Expression, ) run.Func
func NewBackupAction ¶
func NewBackupAction( sentryClient libsentry.Client, k8sConnector K8sConnector, backupExectuor BackupExectuor, ) run.Runnable
Types ¶
type BackupExectuor ¶
type BackupExectuor interface {
Backup(ctx context.Context, target v1.BackupSpec) error
}
func CreateBackupExectuor ¶
func CreateBackupExectuor( currentTimeGetter libtime.CurrentTimeGetter, backupRootDirectory Path, sshPrivateKey SSHPrivateKey, ) BackupExectuor
func NewBackupExectuor ¶
func NewBackupExectuor( currentTimeGetter libtime.CurrentTimeGetter, rsyncExectuor RsyncExectuor, backupRootDirectory Path, sshPrivateKey SSHPrivateKey, ) BackupExectuor
func NewBackupExectuorOnlyOnce ¶
func NewBackupExectuorOnlyOnce( backupExectuor BackupExectuor, ) BackupExectuor
type K8sConnector ¶
type K8sConnector interface { SetupCustomResourceDefinition(ctx context.Context) error Listen(ctx context.Context, resourceEventHandler cache.ResourceEventHandler) error Targets(ctx context.Context) (backupv1.Targets, error) Target(ctx context.Context, name string) (*backupv1.Target, error) }
func NewK8sConnector ¶
func NewK8sConnector( kubeconfig string, namespace k8s.Namespace, ) K8sConnector
type RsyncExectuor ¶
func NewRsyncExectuor ¶
func NewRsyncExectuor() RsyncExectuor
type SSHPrivateKey ¶
type SSHPrivateKey string
func (SSHPrivateKey) String ¶
func (f SSHPrivateKey) String() string
Click to show internal directories.
Click to hide internal directories.