summaryrefslogtreecommitdiff
path: root/pkg/domain/entities
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-27 08:20:13 -0500
committerBrent Baude <bbaude@redhat.com>2020-04-03 09:32:06 -0500
commit8a16674722ab4a33ce66e57d151b09ac348e8e6d (patch)
tree03505f230a58e656e8b85c44b2505696e16c50c2 /pkg/domain/entities
parentccb9e579c48141f70d016adfa9a9d4934bbdf976 (diff)
downloadpodman-8a16674722ab4a33ce66e57d151b09ac348e8e6d.tar.gz
podman-8a16674722ab4a33ce66e57d151b09ac348e8e6d.tar.bz2
podman-8a16674722ab4a33ce66e57d151b09ac348e8e6d.zip
podmanv2 checkpoint and restore
add the ability to checkpoint and restore containers on v2podman Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/domain/entities')
-rw-r--r--pkg/domain/entities/containers.go32
-rw-r--r--pkg/domain/entities/engine_container.go2
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