Support HTTP debug in ctr

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2021-03-22 09:32:34 -07:00
parent 4e919ffaba
commit 22ef69d77d
7 changed files with 104 additions and 37 deletions

View File

@@ -18,7 +18,6 @@ package images
import (
"fmt"
"net/http/httptrace"
"time"
"github.com/containerd/containerd"
@@ -56,10 +55,6 @@ command. As part of this process, we do the following:
Name: "all-platforms",
Usage: "pull content and metadata from all platforms",
},
cli.BoolFlag{
Name: "trace",
Usage: "enable HTTP tracing for registry interactions",
},
cli.BoolFlag{
Name: "all-metadata",
Usage: "Pull metadata for all platforms",
@@ -94,9 +89,6 @@ command. As part of this process, we do the following:
return err
}
if context.Bool("trace") {
ctx = httptrace.WithClientTrace(ctx, NewDebugClientTrace(ctx))
}
img, err := content.Fetch(ctx, client, ref, config)
if err != nil {
return err