MCPcopy Create free account
hub / github.com/docker/cli / updateNodeFilter

Function updateNodeFilter

cli/command/service/ps.go:141–154  ·  view source on GitHub ↗
(ctx context.Context, apiClient client.APIClient, filter client.Filters)

Source from the content-addressed store, hash-verified

139}
140
141func updateNodeFilter(ctx context.Context, apiClient client.APIClient, filter client.Filters) error {
142 if nodeFilters, ok := filter["node"]; ok {
143 for nodeFilter := range nodeFilters {
144 nodeReference, err := node.Reference(ctx, apiClient, nodeFilter)
145 if err != nil {
146 return err
147 }
148 // TODO(thaJeztah): add utility to remove?
149 delete(filter["node"], nodeFilter)
150 filter.Add("node", nodeReference)
151 }
152 }
153 return nil
154}

Callers 2

runPSFunction · 0.85
TestUpdateNodeFilterFunction · 0.85

Calls 1

ReferenceMethod · 0.80

Tested by 1

TestUpdateNodeFilterFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…