MCPcopy
hub / github.com/cloudfoundry/cli / RequestByGUID

Function RequestByGUID

util/batcher/batcher.go:9–29  ·  view source on GitHub ↗
(guids []string, cb callback)

Source from the content-addressed store, hash-verified

7type callback func(guids []string) (ccv3.Warnings, error)
8
9func RequestByGUID(guids []string, cb callback) (ccv3.Warnings, error) {
10 var allWarnings ccv3.Warnings
11
12 for len(guids) > 0 {
13 remaining := len(guids)
14 if remaining > BatchSize {
15 remaining = BatchSize
16 }
17
18 batch := guids[:remaining]
19 guids = guids[remaining:]
20
21 warnings, err := cb(batch)
22 allWarnings = append(allWarnings, warnings...)
23 if err != nil {
24 return allWarnings, err
25 }
26 }
27
28 return allWarnings, nil
29}

Callers 8

getSecurityGroupSpacesFunction · 0.92
GetRouteSummariesMethod · 0.92
batcher_test.goFile · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected