diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-01-15 18:25:40 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-15 18:25:40 +0000 |
commit | da22dc1148eb852e74eb0ea565debdfeffedd2e4 (patch) | |
tree | be79b0fc7eac5ca46096d2af44aa78cf5793be5e /pkg/shim/runsc | |
parent | 578c5460b62f52063bef41203940a315deced6b3 (diff) | |
parent | 714a020ab5cc56f61f92f407212209628f43c46b (diff) |
Merge release-20210112.0-28-g714a020ab (automated)
Diffstat (limited to 'pkg/shim/runsc')
-rw-r--r-- | pkg/shim/runsc/runsc.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/shim/runsc/runsc.go b/pkg/shim/runsc/runsc.go index aedaf5ee5..3c4cbf223 100644 --- a/pkg/shim/runsc/runsc.go +++ b/pkg/shim/runsc/runsc.go @@ -167,6 +167,20 @@ func (r *Runsc) Create(context context.Context, id, bundle string, opts *CreateO return err } +func (r *Runsc) Pause(context context.Context, id string) error { + if _, err := cmdOutput(r.command(context, "pause", id), true); err != nil { + return fmt.Errorf("unable to pause: %w", err) + } + return nil +} + +func (r *Runsc) Resume(context context.Context, id string) error { + if _, err := cmdOutput(r.command(context, "resume", id), true); err != nil { + return fmt.Errorf("unable to resume: %w", err) + } + return nil +} + // Start will start an already created container. func (r *Runsc) Start(context context.Context, id string, cio runc.IO) error { cmd := r.command(context, "start", id) |