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

Function NewHTTPObj

cmn/bck.go:545–556  ·  view source on GitHub ↗

HTTPBckObj //

(u *url.URL)

Source from the content-addressed store, hash-verified

543////////////////
544
545func NewHTTPObj(u *url.URL) *HTTPBckObj {
546 hbo := &HTTPBckObj{
547 Bck: Bck{
548 Provider: apc.ProviderHTTP,
549 Ns: NsGlobal,
550 },
551 }
552 hbo.OrigURLBck, hbo.ObjName = filepath.Split(u.Path)
553 hbo.OrigURLBck = u.Scheme + apc.BckProviderSeparator + u.Host + hbo.OrigURLBck
554 hbo.Bck.Name = OrigURLBck2Name(hbo.OrigURLBck)
555 return hbo
556}
557
558func NewHTTPObjPath(rawURL string) (*HTTPBckObj, error) {
559 urlObj, err := url.ParseRequestURI(rawURL)

Callers 2

httpCloudHandlerMethod · 0.92
NewHTTPObjPathFunction · 0.85

Calls 1

OrigURLBck2NameFunction · 0.85

Tested by

no test coverage detected