DumpRequests wraps the underlying http.Client transport to logs all requests/responses to the log.
(ctx context.Context, client *http.Client, writer io.Writer)
| 63 | |
| 64 | // DumpRequests wraps the underlying http.Client transport to logs all requests/responses to the log. |
| 65 | func 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. |
no test coverage detected
searching dependent graphs…