Skip to content

Commit

Permalink
use consistent alias for criu rpc
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Jun 5, 2021
1 parent 70028a3 commit 42ea1be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"path/filepath"
"strconv"

criu "github.com/checkpoint-restore/go-criu/v5/rpc"
criurpc "github.com/checkpoint-restore/go-criu/v5/rpc"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/userns"
"github.com/opencontainers/runtime-spec/specs-go"
Expand Down Expand Up @@ -135,11 +135,11 @@ func setManageCgroupsMode(context *cli.Context, options *libcontainer.CriuOpts)
if cgOpt := context.String("manage-cgroups-mode"); cgOpt != "" {
switch cgOpt {
case "soft":
options.ManageCgroupsMode = criu.CriuCgMode_SOFT
options.ManageCgroupsMode = criurpc.CriuCgMode_SOFT
case "full":
options.ManageCgroupsMode = criu.CriuCgMode_FULL
options.ManageCgroupsMode = criurpc.CriuCgMode_FULL
case "strict":
options.ManageCgroupsMode = criu.CriuCgMode_STRICT
options.ManageCgroupsMode = criurpc.CriuCgMode_STRICT
default:
fatal(errors.New("Invalid manage cgroups mode"))
}
Expand Down
4 changes: 2 additions & 2 deletions libcontainer/criu_opts_linux.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package libcontainer

import criu "github.com/checkpoint-restore/go-criu/v5/rpc"
import criurpc "github.com/checkpoint-restore/go-criu/v5/rpc"

type CriuPageServerInfo struct {
Address string // IP address of CRIU page server
Expand All @@ -24,7 +24,7 @@ type CriuOpts struct {
PreDump bool // call criu predump to perform iterative checkpoint
PageServer CriuPageServerInfo // allow to dump to criu page server
VethPairs []VethPairName // pass the veth to criu when restore
ManageCgroupsMode criu.CriuCgMode // dump or restore cgroup mode
ManageCgroupsMode criurpc.CriuCgMode // dump or restore cgroup mode
EmptyNs uint32 // don't c/r properties for namespace from this mask
AutoDedup bool // auto deduplication for incremental dumps
LazyPages bool // restore memory pages lazily using userfaultfd
Expand Down

0 comments on commit 42ea1be

Please sign in to comment.