mirror of
https://github.com/rancher/os.git
synced 2025-09-04 08:14:21 +00:00
Bump libcompose and its dependencies
This commit is contained in:
19
vendor/github.com/docker/engine-api/client/container_restart.go
generated
vendored
Normal file
19
vendor/github.com/docker/engine-api/client/container_restart.go
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
// ContainerRestart stops and starts a container again.
|
||||
// It makes the daemon to wait for the container to be up again for
|
||||
// a specific amount of time, given the timeout.
|
||||
func (cli *Client) ContainerRestart(ctx context.Context, containerID string, timeout int) error {
|
||||
query := url.Values{}
|
||||
query.Set("t", strconv.Itoa(timeout))
|
||||
resp, err := cli.post(ctx, "/containers/"+containerID+"/restart", query, nil, nil)
|
||||
ensureReaderClosed(resp)
|
||||
return err
|
||||
}
|
Reference in New Issue
Block a user