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

Method bucketHandler

ais/proxy.go:362–384  ·  view source on GitHub ↗

verb /v1/buckets/

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

360
361// verb /v1/buckets/
362func (p *proxy) bucketHandler(w http.ResponseWriter, r *http.Request) {
363 if !p.ClusterStartedWithRetry() {
364 w.WriteHeader(http.StatusServiceUnavailable)
365 return
366 }
367 switch r.Method {
368 case http.MethodGet:
369 p.httpbckget(w, r)
370 case http.MethodDelete:
371 p.httpbckdelete(w, r)
372 case http.MethodPut:
373 p.httpbckput(w, r)
374 case http.MethodPost:
375 p.httpbckpost(w, r)
376 case http.MethodHead:
377 p.httpbckhead(w, r)
378 case http.MethodPatch:
379 p.httpbckpatch(w, r)
380 default:
381 cmn.WriteErr405(w, r, http.MethodDelete, http.MethodGet, http.MethodHead,
382 http.MethodPatch, http.MethodPost)
383 }
384}
385
386// verb /v1/objects/
387func (p *proxy) objectHandler(w http.ResponseWriter, r *http.Request) {

Callers 1

easyURLHandlerMethod · 0.95

Calls 9

httpbckgetMethod · 0.95
httpbckdeleteMethod · 0.95
httpbckputMethod · 0.95
httpbckpostMethod · 0.95
httpbckheadMethod · 0.95
httpbckpatchMethod · 0.95
WriteErr405Function · 0.92
WriteHeaderMethod · 0.80

Tested by

no test coverage detected