internally mark if a server is restoring to restrict actions

This commit is contained in:
Matthew Penner
2021-03-12 16:19:35 -07:00
parent b63a491b5e
commit 471886dd34
5 changed files with 32 additions and 3 deletions

View File

@@ -60,6 +60,7 @@ type Server struct {
// installer process is still running.
installing *system.AtomicBool
transferring *system.AtomicBool
restoring *system.AtomicBool
// The console throttler instance used to control outputs.
throttler *ConsoleThrottler
@@ -79,6 +80,7 @@ func New(client remote.Client) (*Server, error) {
client: client,
installing: system.NewAtomicBool(false),
transferring: system.NewAtomicBool(false),
restoring: system.NewAtomicBool(false),
}
if err := defaults.Set(&s); err != nil {
return nil, errors.Wrap(err, "server: could not set default values for struct")