-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP [vtctld] backup status #8308
Conversation
…le/BackupEngine interfaces to support populating BackupInfo.Status Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
// read-only backups (created by ListBackups). Returns a boolean to indicate | ||
// if the file exists, and an error. Variants of "file not found" errors do | ||
// result in an error, but instead result in (false, nil). | ||
CheckFile(ctx context.Context, filename string) (bool, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I've only implemented this for filebackupstorage
and s3backupstorage
for now.
@@ -119,6 +125,10 @@ var BackupRestoreEngineMap = make(map[string]BackupRestoreEngine) | |||
// This must only be called after flags have been parsed. | |||
func GetBackupEngine() (BackupEngine, error) { | |||
name := *backupEngineImplementation | |||
return getBackupEngine(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very small method extraction to let me reuse the error codes, but specifying a particular engine name rather than "whatever value the flag pointer has"
This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:
If no action is taken within 7 days, this PR will be closed. |
This PR was closed because it has been stale for 7 days with no activity. |
Description
Demo
Note that for this, I made a quick change to
builtinbackupengine
'sGetBackupStatus
method to return a random status, via:Anyway, the results, showing limiting and details (more to show that the backend impl is correct than anything about the CLI usability -- i am going to change the way we marshal json to convert enums from ints to their actual names separately):
Related Issue(s)
Checklist
Deployment Notes