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) PreRestoreLockOnly() BackupAndRestoreScripts
- func (s BackupAndRestoreScripts) RestoreOnly() BackupAndRestoreScripts
- func (s BackupAndRestoreScripts) SinglePostRestoreUnlockScript() Script
- type DeployedInstance
- func (i *DeployedInstance) ArtifactDirCreated() bool
- func (i *DeployedInstance) ArtifactDirExists() (bool, error)
- func (i *DeployedInstance) ArtifactsToBackup() []orchestrator.BackupArtifact
- func (i *DeployedInstance) ArtifactsToRestore() []orchestrator.BackupArtifact
- func (i *DeployedInstance) Backup() error
- func (i *DeployedInstance) ConnectedUsername() string
- func (i *DeployedInstance) CustomBackupArtifactNames() []string
- func (i *DeployedInstance) CustomRestoreArtifactNames() []string
- func (i *DeployedInstance) ID() string
- func (i *DeployedInstance) Index() string
- func (i *DeployedInstance) IsBackupable() bool
- func (i *DeployedInstance) IsRestorable() bool
- func (i *DeployedInstance) Jobs() []orchestrator.Job
- func (i *DeployedInstance) MarkArtifactDirCreated()
- func (i *DeployedInstance) Name() string
- func (i *DeployedInstance) RemoveArtifactDir() error
- func (i *DeployedInstance) Restore() error
- type InstanceIdentifier
- type Job
- func (j Job) Backup() error
- func (j Job) BackupArtifactDirectory() string
- func (j Job) BackupArtifactName() string
- func (j Job) BackupShouldBeLockedBefore() []orchestrator.JobSpecifier
- func (j Job) HasBackup() bool
- func (j Job) HasNamedBackupArtifact() bool
- func (j Job) HasNamedRestoreArtifact() bool
- func (j Job) HasRestore() bool
- func (j Job) InstanceIdentifier() string
- func (j Job) Name() string
- func (j Job) PostBackupUnlock() error
- func (j Job) PostRestoreUnlock() error
- func (j Job) PreBackupLock() error
- func (j Job) PreRestoreLock() error
- func (j Job) Release() string
- func (j Job) Restore() error
- func (j Job) RestoreArtifactDirectory() string
- func (j Job) RestoreArtifactName() string
- func (j Job) RestoreScript() Script
- func (j Job) RestoreShouldBeLockedBefore() []orchestrator.JobSpecifier
- type JobFinder
- type JobFinderFromScripts
- type LockBefore
- type Logger
- type Metadata
- type ReleaseMapping
- type ReleaseMappingFinder
- type Script
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct { Logger // contains filtered or unexported fields }
func NewBackupArtifact ¶
func NewBackupArtifact(job orchestrator.Job, instance orchestrator.InstanceIdentifer, remoteRunner ssh.RemoteRunner, logger Logger) *Artifact
func NewRestoreArtifact ¶
func NewRestoreArtifact(job orchestrator.Job, instance orchestrator.InstanceIdentifer, remoteRunner ssh.RemoteRunner, 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) PreRestoreLockOnly ¶ added in v1.1.0
func (s BackupAndRestoreScripts) PreRestoreLockOnly() BackupAndRestoreScripts
func (BackupAndRestoreScripts) RestoreOnly ¶
func (s BackupAndRestoreScripts) RestoreOnly() BackupAndRestoreScripts
func (BackupAndRestoreScripts) SinglePostRestoreUnlockScript ¶ added in v1.0.0
func (s BackupAndRestoreScripts) SinglePostRestoreUnlockScript() Script
type DeployedInstance ¶
type DeployedInstance struct { Logger // contains filtered or unexported fields }
func NewDeployedInstance ¶
func NewDeployedInstance(instanceIndex string, instanceGroupName string, instanceID string, artifactDirCreated bool, remoteRunner ssh.RemoteRunner, logger Logger, jobs orchestrator.Jobs) *DeployedInstance
func (*DeployedInstance) ArtifactDirCreated ¶
func (i *DeployedInstance) ArtifactDirCreated() bool
func (*DeployedInstance) ArtifactDirExists ¶
func (i *DeployedInstance) ArtifactDirExists() (bool, error)
func (*DeployedInstance) ArtifactsToBackup ¶
func (i *DeployedInstance) ArtifactsToBackup() []orchestrator.BackupArtifact
func (*DeployedInstance) ArtifactsToRestore ¶
func (i *DeployedInstance) ArtifactsToRestore() []orchestrator.BackupArtifact
func (*DeployedInstance) Backup ¶
func (i *DeployedInstance) Backup() error
func (*DeployedInstance) ConnectedUsername ¶ added in v1.1.4
func (i *DeployedInstance) ConnectedUsername() string
func (*DeployedInstance) CustomBackupArtifactNames ¶
func (i *DeployedInstance) CustomBackupArtifactNames() []string
func (*DeployedInstance) CustomRestoreArtifactNames ¶
func (i *DeployedInstance) CustomRestoreArtifactNames() []string
func (*DeployedInstance) ID ¶
func (i *DeployedInstance) ID() string
func (*DeployedInstance) Index ¶
func (i *DeployedInstance) Index() string
func (*DeployedInstance) IsBackupable ¶ added in v1.0.0
func (i *DeployedInstance) IsBackupable() bool
func (*DeployedInstance) IsRestorable ¶
func (i *DeployedInstance) IsRestorable() bool
func (*DeployedInstance) Jobs ¶ added in v1.1.0
func (i *DeployedInstance) Jobs() []orchestrator.Job
func (*DeployedInstance) MarkArtifactDirCreated ¶
func (i *DeployedInstance) MarkArtifactDirCreated()
func (*DeployedInstance) Name ¶
func (i *DeployedInstance) Name() string
func (*DeployedInstance) RemoveArtifactDir ¶ added in v1.1.4
func (i *DeployedInstance) RemoveArtifactDir() error
func (*DeployedInstance) Restore ¶
func (i *DeployedInstance) Restore() error
type InstanceIdentifier ¶ added in v1.1.0
func (InstanceIdentifier) String ¶ added in v1.1.0
func (i InstanceIdentifier) String() string
type Job ¶
type Job struct { Logger Logger // contains filtered or unexported fields }
func NewJob ¶
func NewJob(remoteRunner ssh.RemoteRunner, instanceIdentifier string, logger Logger, release string, jobScripts BackupAndRestoreScripts, metadata Metadata) Job
func (Job) BackupArtifactDirectory ¶
func (Job) BackupArtifactName ¶
func (Job) BackupShouldBeLockedBefore ¶ added in v1.1.0
func (j Job) BackupShouldBeLockedBefore() []orchestrator.JobSpecifier
func (Job) HasNamedBackupArtifact ¶
func (Job) HasNamedRestoreArtifact ¶
func (Job) HasRestore ¶
func (Job) InstanceIdentifier ¶ added in v1.1.0
func (Job) PostBackupUnlock ¶ added in v1.0.0
func (Job) PostRestoreUnlock ¶ added in v1.0.0
func (Job) PreBackupLock ¶ added in v1.0.0
func (Job) PreRestoreLock ¶ added in v1.1.0
func (Job) RestoreArtifactDirectory ¶
func (Job) RestoreArtifactName ¶
func (Job) RestoreScript ¶
func (Job) RestoreShouldBeLockedBefore ¶ added in v1.1.0
func (j Job) RestoreShouldBeLockedBefore() []orchestrator.JobSpecifier
type JobFinder ¶
type JobFinder interface {
FindJobs(instanceIdentifier InstanceIdentifier, remoteRunner ssh.RemoteRunner, releaseMapping ReleaseMapping) (orchestrator.Jobs, error)
}
type JobFinderFromScripts ¶
type JobFinderFromScripts struct {
Logger Logger
}
func NewJobFinder ¶
func NewJobFinder(logger Logger) *JobFinderFromScripts
func (*JobFinderFromScripts) FindJobs ¶
func (j *JobFinderFromScripts) FindJobs(instanceIdentifier InstanceIdentifier, remoteRunner ssh.RemoteRunner, releaseMapping ReleaseMapping) (orchestrator.Jobs, error)
type LockBefore ¶ added in v1.1.0
func (LockBefore) Validate ¶ added in v1.1.0
func (l LockBefore) Validate() error
type Metadata ¶
type Metadata struct { BackupName string `yaml:"backup_name"` RestoreName string `yaml:"restore_name"` BackupShouldBeLockedBefore []LockBefore `yaml:"backup_should_be_locked_before"` RestoreShouldBeLockedBefore []LockBefore `yaml:"restore_should_be_locked_before"` }
func ParseJobMetadata ¶ added in v1.1.0
type ReleaseMapping ¶ added in v1.1.0
type ReleaseMapping interface {
FindReleaseName(instanceGroupName, jobName string) (string, error)
}
func NewNoopReleaseMapping ¶ added in v1.1.4
func NewNoopReleaseMapping() ReleaseMapping
type ReleaseMappingFinder ¶ added in v1.1.0
type ReleaseMappingFinder func(manifest string) (ReleaseMapping, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.