mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Implement docker unpause with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
parent
d78ce02f88
commit
b8be62e28e
2 changed files with 9 additions and 1 deletions
8
api/client/lib/container_unpause.go
Normal file
8
api/client/lib/container_unpause.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
package lib
|
||||
|
||||
// ContainerUnpause resumes the process execution within a container
|
||||
func (cli *Client) ContainerUnpause(containerID string) error {
|
||||
resp, err := cli.POST("/containers/"+containerID+"/unpause", nil, nil, nil)
|
||||
ensureReaderClosed(resp)
|
||||
return err
|
||||
}
|
|
@ -18,7 +18,7 @@ func (cli *DockerCli) CmdUnpause(args ...string) error {
|
|||
|
||||
var errNames []string
|
||||
for _, name := range cmd.Args() {
|
||||
if _, _, err := readBody(cli.call("POST", fmt.Sprintf("/containers/%s/unpause", name), nil, nil)); err != nil {
|
||||
if err := cli.client.ContainerUnpause(name); err != nil {
|
||||
fmt.Fprintf(cli.err, "%s\n", err)
|
||||
errNames = append(errNames, name)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue