MCPcopy Index your code
hub / github.com/docker/cli / runUpdate

Function runUpdate

cli/command/node/update.go:51–55  ·  view source on GitHub ↗
(ctx context.Context, dockerCLI command.Cli, flags *pflag.FlagSet, nodeID string)

Source from the content-addressed store, hash-verified

49}
50
51func runUpdate(ctx context.Context, dockerCLI command.Cli, flags *pflag.FlagSet, nodeID string) error {
52 return updateNodes(ctx, dockerCLI.Client(), []string{nodeID}, mergeNodeUpdate(flags), func(_ string) {
53 _, _ = fmt.Fprintln(dockerCLI.Out(), nodeID)
54 })
55}
56
57func updateNodes(ctx context.Context, apiClient client.NodeAPIClient, nodes []string, mergeNode func(node *swarm.Node) error, success func(nodeID string)) error {
58 for _, nodeID := range nodes {

Callers 1

newUpdateCommandFunction · 0.70

Calls 4

updateNodesFunction · 0.85
mergeNodeUpdateFunction · 0.85
ClientMethod · 0.65
OutMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…