diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-06-18 14:45:50 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-18 14:46:49 -0700 |
commit | bdb19b82ef2aa1638d98da4b1c55ae7928437f55 (patch) | |
tree | e17a3827341aef639e058893c055dc164f1a247d /runsc/cmd/restore.go | |
parent | 2e1379867a77bfa94cc740b6d1407d3702810c73 (diff) |
Add Container/Sandbox args struct for creation
There were 3 string arguments that could be easily misplaced
and it makes it easier to add new arguments, especially for
Container that has dozens of callers.
PiperOrigin-RevId: 253872074
Diffstat (limited to 'runsc/cmd/restore.go')
-rw-r--r-- | runsc/cmd/restore.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/runsc/cmd/restore.go b/runsc/cmd/restore.go index a5124697d..e18910325 100644 --- a/runsc/cmd/restore.go +++ b/runsc/cmd/restore.go @@ -100,7 +100,15 @@ func (r *Restore) Execute(_ context.Context, f *flag.FlagSet, args ...interface{ conf.RestoreFile = filepath.Join(r.imagePath, checkpointFileName) - ws, err := container.Run(id, spec, conf, bundleDir, r.consoleSocket, r.pidFile, r.userLog, r.detach) + runArgs := container.Args{ + ID: id, + Spec: spec, + BundleDir: bundleDir, + ConsoleSocket: r.consoleSocket, + PIDFile: r.pidFile, + UserLog: r.userLog, + } + ws, err := container.Run(conf, runArgs, r.detach) if err != nil { return Errorf("running container: %v", err) } |