MCPcopy Create free account
hub / github.com/containerd/nerdctl / displayHierarchy

Function displayHierarchy

pkg/transferutil/progress.go:284–297  ·  view source on GitHub ↗
(w io.Writer, status string, roots []*progressNode, start time.Time)

Source from the content-addressed store, hash-verified

282}
283
284func displayHierarchy(w io.Writer, status string, roots []*progressNode, start time.Time) {
285 total := displayNode(w, "", roots)
286 for _, r := range roots {
287 if desc := r.mainDesc(); desc != nil {
288 fmt.Fprintf(w, "%s %s\n", desc.MediaType, desc.Digest)
289 }
290 }
291 // Print the Status line
292 fmt.Fprintf(w, "%s\telapsed: %-4.1fs\ttotal: %7.6v\t(%v)\t\n",
293 status,
294 time.Since(start).Seconds(),
295 progress.Bytes(total),
296 progress.NewBytesPerSecond(total, time.Since(start)))
297}
298
299func displayNode(w io.Writer, prefix string, nodes []*progressNode) int64 {
300 var total int64

Callers 2

ProgressHandlerFunction · 0.85
ProgressHandlerLoadImageFunction · 0.85

Calls 2

displayNodeFunction · 0.85
mainDescMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…