github.com/MaximeAubanel/moby@v1.13.1/client/container_pause.go (about)

     1  package client
     2  
     3  import "golang.org/x/net/context"
     4  
     5  // ContainerPause pauses the main process of a given container without terminating it.
     6  func (cli *Client) ContainerPause(ctx context.Context, containerID string) error {
     7  	resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil)
     8  	ensureReaderClosed(resp)
     9  	return err
    10  }