MCPcopy
hub / github.com/containerd/containerd / ServeHTTP

Method ServeHTTP

core/remotes/docker/resolver_test.go:1074–1081  ·  view source on GitHub ↗
(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

1072type namespaceRouter map[string]http.Handler
1073
1074func (nr namespaceRouter) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
1075 h, ok := nr[r.URL.Query().Get(namespaceQueryArg)]
1076 if !ok {
1077 rw.WriteHeader(http.StatusNotFound)
1078 return
1079 }
1080 h.ServeHTTP(rw, r)
1081}
1082
1083func runBasicTest(t *testing.T, name string, sf func(h http.Handler) (string, ResolverOptions, func())) {
1084 var (

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
ServeHTTPMethod · 0.45

Tested by

no test coverage detected