NodeUpdate updates a Node.
(ctx context.Context, nodeID string, options NodeUpdateOptions)
| 18 | |
| 19 | // NodeUpdate updates a Node. |
| 20 | func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, options NodeUpdateOptions) (NodeUpdateResult, error) { |
| 21 | nodeID, err := trimID("node", nodeID) |
| 22 | if err != nil { |
| 23 | return NodeUpdateResult{}, err |
| 24 | } |
| 25 | |
| 26 | query := url.Values{} |
| 27 | query.Set("version", options.Version.String()) |
| 28 | resp, err := cli.post(ctx, "/nodes/"+nodeID+"/update", query, options.Spec, nil) |
| 29 | defer ensureReaderClosed(resp) |
| 30 | return NodeUpdateResult{}, err |
| 31 | } |
nothing calls this directly
no test coverage detected