mirror of
https://github.com/moby/moby.git
synced 2026-01-11 02:31:44 +00:00
To better match the method name itself Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
29 lines
870 B
Go
29 lines
870 B
Go
package client
|
|
|
|
import "context"
|
|
|
|
// ContainerUnpauseOptions holds options for [Client.ContainerUnpause].
|
|
type ContainerUnpauseOptions struct {
|
|
// Add future optional parameters here.
|
|
}
|
|
|
|
// ContainerUnpauseResult holds the result of [Client.ContainerUnpause],
|
|
type ContainerUnpauseResult struct {
|
|
// Add future fields here.
|
|
}
|
|
|
|
// ContainerUnpause resumes the process execution within a container.
|
|
func (cli *Client) ContainerUnpause(ctx context.Context, containerID string, options ContainerUnpauseOptions) (ContainerUnpauseResult, error) {
|
|
containerID, err := trimID("container", containerID)
|
|
if err != nil {
|
|
return ContainerUnpauseResult{}, err
|
|
}
|
|
|
|
resp, err := cli.post(ctx, "/containers/"+containerID+"/unpause", nil, nil, nil)
|
|
defer ensureReaderClosed(resp)
|
|
if err != nil {
|
|
return ContainerUnpauseResult{}, err
|
|
}
|
|
return ContainerUnpauseResult{}, nil
|
|
}
|