MCPcopy
hub / github.com/NVIDIA/aistore / doListRange

Method doListRange

ais/proxy.go:2183–2209  ·  view source on GitHub ↗
(method, bucket string, msg *apc.ActionMsg, query url.Values)

Source from the content-addressed store, hash-verified

2181}
2182
2183func (p *proxy) doListRange(method, bucket string, msg *apc.ActionMsg, query url.Values) (xactID string, err error) {
2184 var (
2185 smap = p.owner.smap.get()
2186 aisMsg = p.newAmsg(msg, nil, cos.GenUUID())
2187 body = cos.MustMarshal(aisMsg)
2188 path = apc.URLPathBuckets.Join(bucket)
2189 )
2190 nlb := xact.NewXactNL(aisMsg.UUID, aisMsg.Action, &smap.Smap, nil)
2191 nlb.SetOwner(equalIC)
2192 p.ic.registerEqual(regIC{smap: smap, query: query, nl: nlb})
2193 args := allocBcArgs()
2194 args.req = cmn.HreqArgs{Method: method, Path: path, Query: query, Body: body}
2195 args.smap = smap
2196 args.timeout = apc.DefaultTimeout
2197 results := p.bcastGroup(args)
2198 freeBcArgs(args)
2199 for _, res := range results {
2200 if res.err == nil {
2201 continue
2202 }
2203 err = res.errorf("%s failed to %q List/Range", res.si, msg.Action)
2204 break
2205 }
2206 freeBcastRes(results)
2207 xactID = aisMsg.UUID
2208 return
2209}
2210
2211func (p *proxy) reverseHandler(w http.ResponseWriter, r *http.Request) {
2212 apiItems, err := p.checkRESTItems(w, r, 1, false, apc.URLPathReverse.L)

Callers 3

httpbckdeleteMethod · 0.95
hpostBucketMethod · 0.95
delMultipleObjsMethod · 0.95

Calls 13

GenUUIDFunction · 0.92
MustMarshalFunction · 0.92
NewXactNLFunction · 0.92
allocBcArgsFunction · 0.85
freeBcArgsFunction · 0.85
freeBcastResFunction · 0.85
newAmsgMethod · 0.80
JoinMethod · 0.80
registerEqualMethod · 0.80
bcastGroupMethod · 0.80
errorfMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected