Documentation ¶
Index ¶
- type Artifact
- func (b *Artifact) Checksum() (orchestrator.BackupChecksum, error)
- func (b *Artifact) Delete() error
- func (b *Artifact) HasCustomName() bool
- func (b *Artifact) InstanceID() string
- func (b *Artifact) InstanceIndex() string
- func (b *Artifact) InstanceName() string
- func (b *Artifact) Name() string
- func (b *Artifact) Size() (string, error)
- func (b *Artifact) SizeInBytes() (int, 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) HasMetadataRestoreNames() bool
- 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) HasMetadataRestoreName() 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(afterSuccessfulBackup bool) 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 ManifestQuerier
- type ManifestQuerierCreator
- type Metadata
- type MetadataParserFunc
- 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) InstanceID ¶
func (*Artifact) InstanceIndex ¶
func (*Artifact) InstanceName ¶
func (*Artifact) SizeInBytes ¶ added in v1.7.2
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 ¶
func (s BackupAndRestoreScripts) PreRestoreLockOnly() BackupAndRestoreScripts
func (BackupAndRestoreScripts) RestoreOnly ¶
func (s BackupAndRestoreScripts) RestoreOnly() BackupAndRestoreScripts
func (BackupAndRestoreScripts) SinglePostRestoreUnlockScript ¶
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 ¶
func (i *DeployedInstance) ConnectedUsername() string
func (*DeployedInstance) HasMetadataRestoreNames ¶
func (i *DeployedInstance) HasMetadataRestoreNames() bool
func (*DeployedInstance) ID ¶
func (i *DeployedInstance) ID() string
func (*DeployedInstance) Index ¶
func (i *DeployedInstance) Index() string
func (*DeployedInstance) IsBackupable ¶
func (i *DeployedInstance) IsBackupable() bool
func (*DeployedInstance) IsRestorable ¶
func (i *DeployedInstance) IsRestorable() bool
func (*DeployedInstance) Jobs ¶
func (i *DeployedInstance) Jobs() []orchestrator.Job
func (*DeployedInstance) MarkArtifactDirCreated ¶
func (i *DeployedInstance) MarkArtifactDirCreated()
func (*DeployedInstance) Name ¶
func (i *DeployedInstance) Name() string
func (*DeployedInstance) RemoveArtifactDir ¶
func (i *DeployedInstance) RemoveArtifactDir() error
func (*DeployedInstance) Restore ¶
func (i *DeployedInstance) Restore() error
type InstanceIdentifier ¶
func (InstanceIdentifier) String ¶
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, backupOneRestoreAll bool, onBootstrapNode bool) Job
func (Job) BackupArtifactDirectory ¶
func (Job) BackupArtifactName ¶
func (Job) BackupShouldBeLockedBefore ¶
func (j Job) BackupShouldBeLockedBefore() []orchestrator.JobSpecifier
func (Job) HasMetadataRestoreName ¶
func (Job) HasNamedBackupArtifact ¶
func (Job) HasNamedRestoreArtifact ¶
func (Job) HasRestore ¶
func (Job) InstanceIdentifier ¶
func (Job) PostBackupUnlock ¶
func (Job) PostRestoreUnlock ¶
func (Job) PreBackupLock ¶
func (Job) PreRestoreLock ¶
func (Job) RestoreArtifactDirectory ¶
func (Job) RestoreArtifactName ¶
func (Job) RestoreScript ¶
func (Job) RestoreShouldBeLockedBefore ¶
func (j Job) RestoreShouldBeLockedBefore() []orchestrator.JobSpecifier
type JobFinder ¶
type JobFinder interface {
FindJobs(instanceIdentifier InstanceIdentifier, remoteRunner ssh.RemoteRunner, manifestQuerier ManifestQuerier) (orchestrator.Jobs, error)
}
type JobFinderFromScripts ¶
type JobFinderFromScripts struct { Logger Logger // contains filtered or unexported fields }
func NewJobFinder ¶
func NewJobFinder(bbrVersion string, logger Logger) *JobFinderFromScripts
func NewJobFinderOmitMetadataReleases ¶
func NewJobFinderOmitMetadataReleases(bbrVersion string, logger Logger) *JobFinderFromScripts
func (*JobFinderFromScripts) FindJobs ¶
func (j *JobFinderFromScripts) FindJobs(instanceIdentifier InstanceIdentifier, remoteRunner ssh.RemoteRunner, manifestQuerier ManifestQuerier) (orchestrator.Jobs, error)
type LockBefore ¶
func (LockBefore) Validate ¶
func (l LockBefore) Validate() error
type ManifestQuerier ¶
type ManifestQuerier interface { FindReleaseName(instanceGroupName, jobName string) (string, error) IsJobBackupOneRestoreAll(instanceGroupName, jobName string) (bool, error) }
func NewNoopManifestQuerier ¶
func NewNoopManifestQuerier() ManifestQuerier
type ManifestQuerierCreator ¶
type ManifestQuerierCreator func(manifest string) (ManifestQuerier, 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"` SkipBBRScripts bool `yaml:"skip_bbr_scripts"` }
func ParseJobMetadata ¶
type MetadataParserFunc ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.