mirror of
https://github.com/genuinetools/reg.git
synced 2024-10-03 13:51:45 -04:00
8e5eba8735
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
47 lines
1.2 KiB
Go
47 lines
1.2 KiB
Go
// +build linux
|
|
|
|
package main
|
|
|
|
import "github.com/codegangsta/cli"
|
|
|
|
var pauseCommand = cli.Command{
|
|
Name: "pause",
|
|
Usage: "pause suspends all processes inside the container",
|
|
ArgsUsage: `<container-id>
|
|
|
|
Where "<container-id>" is the name for the instance of the container to be
|
|
paused. `,
|
|
Description: `The pause command suspends all processes in the instance of the container.
|
|
|
|
Use runc list to identiy instances of containers and their current status.`,
|
|
Action: func(context *cli.Context) {
|
|
container, err := getContainer(context)
|
|
if err != nil {
|
|
fatal(err)
|
|
}
|
|
if err := container.Pause(); err != nil {
|
|
fatal(err)
|
|
}
|
|
},
|
|
}
|
|
|
|
var resumeCommand = cli.Command{
|
|
Name: "resume",
|
|
Usage: "resumes all processes that have been previously paused",
|
|
ArgsUsage: `<container-id>
|
|
|
|
Where "<container-id>" is the name for the instance of the container to be
|
|
resumed.`,
|
|
Description: `The resume command resumes all processes in the instance of the container.
|
|
|
|
Use runc list to identiy instances of containers and their current status.`,
|
|
Action: func(context *cli.Context) {
|
|
container, err := getContainer(context)
|
|
if err != nil {
|
|
fatal(err)
|
|
}
|
|
if err := container.Resume(); err != nil {
|
|
fatal(err)
|
|
}
|
|
},
|
|
}
|