MCPcopy
hub / github.com/containerd/containerd / DumpRequests

Function DumpRequests

pkg/httpdbg/debug.go:65–74  ·  view source on GitHub ↗

DumpRequests wraps the underlying http.Client transport to logs all requests/responses to the log.

(ctx context.Context, client *http.Client, writer io.Writer)

Source from the content-addressed store, hash-verified

63
64// DumpRequests wraps the underlying http.Client transport to logs all requests/responses to the log.
65func DumpRequests(ctx context.Context, client *http.Client, writer io.Writer) {
66 if writer == nil {
67 writer = log.G(ctx).Writer()
68 }
69
70 client.Transport = debugTransport{
71 transport: client.Transport,
72 writer: writer,
73 }
74}
75
76// NewDebugClientTrace returns a Go http trace client predefined to write DNS and connection
77// information to the log. This is used via the --http-trace flag on push and pull operations in ctr.

Callers 3

NewOCIRegistryFunction · 0.92
UnmarshalAnyMethod · 0.92
GetResolverFunction · 0.92

Calls 1

WriterMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…