MCPcopy
hub / github.com/containerd/containerd / responseFields

Function responseFields

core/remotes/docker/resolver.go:912–928  ·  view source on GitHub ↗
(resp *http.Response)

Source from the content-addressed store, hash-verified

910}
911
912func responseFields(resp *http.Response) log.Fields {
913 fields := map[string]any{
914 "response.status": resp.Status,
915 }
916 for k, vals := range resp.Header {
917 k = strings.ToLower(k)
918 for i, v := range vals {
919 field := "response.header." + k
920 if i > 0 {
921 field = fmt.Sprintf("%s.%d", field, i)
922 }
923 fields[field] = v
924 }
925 }
926
927 return fields
928}
929
930// IsLocalhost checks if the registry host is local.
931func IsLocalhost(host string) bool {

Callers 1

doMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…