MCPcopy
hub / github.com/moby/moby / NodeUpdate

Method NodeUpdate

client/node_update.go:20–31  ·  view source on GitHub ↗

NodeUpdate updates a Node.

(ctx context.Context, nodeID string, options NodeUpdateOptions)

Source from the content-addressed store, hash-verified

18
19// NodeUpdate updates a Node.
20func (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}

Callers

nothing calls this directly

Calls 5

postMethod · 0.95
trimIDFunction · 0.85
ensureReaderClosedFunction · 0.85
SetMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected