diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-03 20:05:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 20:05:30 +0200 |
commit | 64cade0f71a8189403d208cbc7dc8716008229be (patch) | |
tree | 31f36e86cbab604ba51e37255e7b821f9b5a0c7f /pkg/domain/entities | |
parent | 3542700d6e7b630b2eeee8a0e20499bda3dafb03 (diff) | |
parent | 8a16674722ab4a33ce66e57d151b09ac348e8e6d (diff) | |
download | podman-64cade0f71a8189403d208cbc7dc8716008229be.tar.gz podman-64cade0f71a8189403d208cbc7dc8716008229be.tar.bz2 podman-64cade0f71a8189403d208cbc7dc8716008229be.zip |
Merge pull request #5638 from baude/v2containercheck
podmanv2 checkpoint and restore
Diffstat (limited to 'pkg/domain/entities')
-rw-r--r-- | pkg/domain/entities/containers.go | 32 | ||||
-rw-r--r-- | pkg/domain/entities/engine_container.go | 2 |
2 files changed, 34 insertions, 0 deletions
diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index d51124f55..45dea98bf 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -121,3 +121,35 @@ type CommitReport struct { type ContainerExportOptions struct { Output string } + +type CheckpointOptions struct { + All bool + Export string + IgnoreRootFS bool + Keep bool + Latest bool + LeaveRuninng bool + TCPEstablished bool +} + +type CheckpointReport struct { + Err error + Id string +} + +type RestoreOptions struct { + All bool + IgnoreRootFS bool + IgnoreStaticIP bool + IgnoreStaticMAC bool + Import string + Keep bool + Latest bool + Name string + TCPEstablished bool +} + +type RestoreReport struct { + Err error + Id string +} diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go index a122857cd..3aaa7136f 100644 --- a/pkg/domain/entities/engine_container.go +++ b/pkg/domain/entities/engine_container.go @@ -8,6 +8,8 @@ import ( type ContainerEngine interface { ContainerCommit(ctx context.Context, nameOrId string, options CommitOptions) (*CommitReport, error) + ContainerCheckpoint(ctx context.Context, namesOrIds []string, options CheckpointOptions) ([]*CheckpointReport, error) + ContainerRestore(ctx context.Context, namesOrIds []string, options RestoreOptions) ([]*RestoreReport, error) ContainerExists(ctx context.Context, nameOrId string) (*BoolReport, error) ContainerInspect(ctx context.Context, namesOrIds []string, options InspectOptions) ([]*ContainerInspectReport, error) ContainerExport(ctx context.Context, nameOrId string, options ContainerExportOptions) error |