Documentation ¶
Index ¶
- type Artifact
- func (b *Artifact) Checksum() (orchestrator.BackupChecksum, error)
- func (b *Artifact) Delete() error
- func (b *Artifact) HasCustomName() bool
- func (b *Artifact) InstanceIndex() string
- func (b *Artifact) InstanceName() string
- func (b *Artifact) Name() string
- func (b *Artifact) Size() (string, error)
- func (b *Artifact) StreamFromRemote(writer io.Writer) error
- func (b *Artifact) StreamToRemote(reader io.Reader) error
- type BackupAndRestoreScripts
- func (s BackupAndRestoreScripts) BackupOnly() BackupAndRestoreScripts
- func (s BackupAndRestoreScripts) HasBackup() bool
- func (s BackupAndRestoreScripts) MetadataOnly() BackupAndRestoreScripts
- func (s BackupAndRestoreScripts) PostBackupUnlockOnly() BackupAndRestoreScripts
- func (s BackupAndRestoreScripts) PreBackupLockOnly() BackupAndRestoreScripts
- func (s BackupAndRestoreScripts) RestoreOnly() BackupAndRestoreScripts
- type DeployedInstance
- func (d *DeployedInstance) ArtifactDirCreated() bool
- func (d *DeployedInstance) ArtifactDirExists() (bool, error)
- func (d *DeployedInstance) ArtifactsToBackup() []orchestrator.BackupArtifact
- func (d *DeployedInstance) ArtifactsToRestore() []orchestrator.BackupArtifact
- func (d *DeployedInstance) Backup() error
- func (d *DeployedInstance) CustomBackupArtifactNames() []string
- func (d *DeployedInstance) CustomRestoreArtifactNames() []string
- func (d *DeployedInstance) HasBackupScript() bool
- func (d *DeployedInstance) ID() string
- func (d *DeployedInstance) Index() string
- func (d *DeployedInstance) IsPostBackupUnlockable() bool
- func (d *DeployedInstance) IsPreBackupLockable() bool
- func (d *DeployedInstance) IsRestorable() bool
- func (d *DeployedInstance) MarkArtifactDirCreated()
- func (d *DeployedInstance) Name() string
- func (d *DeployedInstance) PostBackupUnlock() error
- func (d *DeployedInstance) PreBackupLock() error
- func (d *DeployedInstance) Restore() error
- func (d *DeployedInstance) RunOnInstance(cmd, label string) ([]byte, []byte, int, error)
- type Job
- func (j Job) BackupArtifactDirectory() string
- func (j Job) BackupArtifactName() string
- func (j Job) BackupScript() Script
- func (j Job) HasBackup() bool
- func (j Job) HasNamedBackupArtifact() bool
- func (j Job) HasNamedRestoreArtifact() bool
- func (j Job) HasPostBackup() bool
- func (j Job) HasPreBackup() bool
- func (j Job) HasRestore() bool
- func (j Job) Name() string
- func (j Job) PostBackupScript() Script
- func (j Job) PreBackupScript() Script
- func (j Job) RestoreArtifactDirectory() string
- func (j Job) RestoreArtifactName() string
- func (j Job) RestoreScript() Script
- type JobFinder
- type JobFinderFromScripts
- type Jobs
- func (jobs Jobs) AnyAreBackupable() bool
- func (jobs Jobs) AnyArePostBackupable() bool
- func (jobs Jobs) AnyArePreBackupable() bool
- func (jobs Jobs) AnyAreRestorable() bool
- func (jobs Jobs) AnyNeedDefaultArtifactsForBackup() bool
- func (jobs Jobs) AnyNeedDefaultArtifactsForRestore() bool
- func (jobs Jobs) Backupable() Jobs
- func (jobs Jobs) CustomBackupArtifactNames() []string
- func (jobs Jobs) CustomRestoreArtifactNames() []string
- func (jobs Jobs) PostBackupable() Jobs
- func (jobs Jobs) PreBackupable() Jobs
- func (jobs Jobs) Restorable() Jobs
- type Logger
- type Metadata
- type SSHConnection
- type Script
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct { SSHConnection Logger // contains filtered or unexported fields }
func NewBackupArtifact ¶
func NewBackupArtifact(job Job, instance orchestrator.InstanceIdentifer, sshConn SSHConnection, logger Logger) *Artifact
func NewRestoreArtifact ¶
func NewRestoreArtifact(job Job, instance orchestrator.InstanceIdentifer, sshConn SSHConnection, logger Logger) *Artifact
func (*Artifact) Checksum ¶
func (b *Artifact) Checksum() (orchestrator.BackupChecksum, error)
func (*Artifact) HasCustomName ¶
func (*Artifact) InstanceIndex ¶
func (*Artifact) InstanceName ¶
type BackupAndRestoreScripts ¶
type BackupAndRestoreScripts []Script
func NewBackupAndRestoreScripts ¶
func NewBackupAndRestoreScripts(files []string) BackupAndRestoreScripts
func (BackupAndRestoreScripts) BackupOnly ¶
func (s BackupAndRestoreScripts) BackupOnly() BackupAndRestoreScripts
func (BackupAndRestoreScripts) HasBackup ¶
func (s BackupAndRestoreScripts) HasBackup() bool
func (BackupAndRestoreScripts) MetadataOnly ¶
func (s BackupAndRestoreScripts) MetadataOnly() BackupAndRestoreScripts
func (BackupAndRestoreScripts) PostBackupUnlockOnly ¶
func (s BackupAndRestoreScripts) PostBackupUnlockOnly() BackupAndRestoreScripts
func (BackupAndRestoreScripts) PreBackupLockOnly ¶
func (s BackupAndRestoreScripts) PreBackupLockOnly() BackupAndRestoreScripts
func (BackupAndRestoreScripts) RestoreOnly ¶
func (s BackupAndRestoreScripts) RestoreOnly() BackupAndRestoreScripts
type DeployedInstance ¶
type DeployedInstance struct { ssh.SSHConnection Logger Jobs // contains filtered or unexported fields }
func NewDeployedInstance ¶
func NewDeployedInstance(instanceIndex string, instanceGroupName string, instanceID string, artifactDirCreated bool, connection ssh.SSHConnection, logger Logger, jobs Jobs) *DeployedInstance
func (*DeployedInstance) ArtifactDirCreated ¶
func (d *DeployedInstance) ArtifactDirCreated() bool
func (*DeployedInstance) ArtifactDirExists ¶
func (d *DeployedInstance) ArtifactDirExists() (bool, error)
func (*DeployedInstance) ArtifactsToBackup ¶
func (d *DeployedInstance) ArtifactsToBackup() []orchestrator.BackupArtifact
func (*DeployedInstance) ArtifactsToRestore ¶
func (d *DeployedInstance) ArtifactsToRestore() []orchestrator.BackupArtifact
func (*DeployedInstance) Backup ¶
func (d *DeployedInstance) Backup() error
func (*DeployedInstance) CustomBackupArtifactNames ¶
func (d *DeployedInstance) CustomBackupArtifactNames() []string
func (*DeployedInstance) CustomRestoreArtifactNames ¶
func (d *DeployedInstance) CustomRestoreArtifactNames() []string
func (*DeployedInstance) HasBackupScript ¶
func (d *DeployedInstance) HasBackupScript() bool
func (*DeployedInstance) ID ¶
func (d *DeployedInstance) ID() string
func (*DeployedInstance) Index ¶
func (d *DeployedInstance) Index() string
func (*DeployedInstance) IsPostBackupUnlockable ¶
func (d *DeployedInstance) IsPostBackupUnlockable() bool
func (*DeployedInstance) IsPreBackupLockable ¶
func (d *DeployedInstance) IsPreBackupLockable() bool
func (*DeployedInstance) IsRestorable ¶
func (d *DeployedInstance) IsRestorable() bool
func (*DeployedInstance) MarkArtifactDirCreated ¶
func (d *DeployedInstance) MarkArtifactDirCreated()
func (*DeployedInstance) Name ¶
func (d *DeployedInstance) Name() string
func (*DeployedInstance) PostBackupUnlock ¶
func (d *DeployedInstance) PostBackupUnlock() error
func (*DeployedInstance) PreBackupLock ¶
func (d *DeployedInstance) PreBackupLock() error
func (*DeployedInstance) Restore ¶
func (d *DeployedInstance) Restore() error
func (*DeployedInstance) RunOnInstance ¶
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
func NewJob ¶
func NewJob(jobScripts BackupAndRestoreScripts, metadata Metadata) Job
func (Job) BackupArtifactDirectory ¶
func (Job) BackupArtifactName ¶
func (Job) BackupScript ¶
func (Job) HasNamedBackupArtifact ¶
func (Job) HasNamedRestoreArtifact ¶
func (Job) HasPostBackup ¶
func (Job) HasPreBackup ¶
func (Job) HasRestore ¶
func (Job) PostBackupScript ¶
func (Job) PreBackupScript ¶
func (Job) RestoreArtifactDirectory ¶
func (Job) RestoreArtifactName ¶
func (Job) RestoreScript ¶
type JobFinder ¶
type JobFinder interface {
FindJobs(hostIdentifier string, connection SSHConnection) (Jobs, error)
}
type JobFinderFromScripts ¶
type JobFinderFromScripts struct {
Logger Logger
}
func NewJobFinder ¶
func NewJobFinder(logger Logger) *JobFinderFromScripts
func (*JobFinderFromScripts) FindJobs ¶
func (j *JobFinderFromScripts) FindJobs(hostIdentifier string, connection SSHConnection) (Jobs, error)
type Jobs ¶
type Jobs []Job
func (Jobs) AnyAreBackupable ¶
func (Jobs) AnyArePostBackupable ¶
func (Jobs) AnyArePreBackupable ¶
func (Jobs) AnyAreRestorable ¶
func (Jobs) AnyNeedDefaultArtifactsForBackup ¶
func (Jobs) AnyNeedDefaultArtifactsForRestore ¶
func (Jobs) Backupable ¶
func (Jobs) CustomBackupArtifactNames ¶
func (Jobs) CustomRestoreArtifactNames ¶
func (Jobs) PostBackupable ¶
func (Jobs) PreBackupable ¶
func (Jobs) Restorable ¶
type Metadata ¶
type Metadata struct { BackupName string `yaml:"backup_name"` RestoreName string `yaml:"restore_name"` }
func NewJobMetadata ¶
type SSHConnection ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.