mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 04:11:03 +00:00
75513575be
* store dependency's in git * since we vendor ... rm tech-depts * aad make target 'vendor' to update vendor folder (manual task)
18 lines
496 B
Go
18 lines
496 B
Go
package docker // import "docker.io/go-docker"
|
|
|
|
import (
|
|
"net/url"
|
|
"strconv"
|
|
|
|
"docker.io/go-docker/api/types/swarm"
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
// NodeUpdate updates a Node.
|
|
func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error {
|
|
query := url.Values{}
|
|
query.Set("version", strconv.FormatUint(version.Index, 10))
|
|
resp, err := cli.post(ctx, "/nodes/"+nodeID+"/update", query, node, nil)
|
|
ensureReaderClosed(resp)
|
|
return err
|
|
}
|