MCPcopy Create free account
hub / github.com/containers/image / newProgressPool

Method newProgressPool

copy/progress_bars.go:21–23  ·  view source on GitHub ↗

newProgressPool creates a *mpb.Progress. The caller must eventually call pool.Wait() after the pool will no longer be updated. NOTE: Every progress bar created within the progress pool must either successfully complete or be aborted, or pool.Wait() will hang. That is typically done using "defer bar.

()

Source from the content-addressed store, hash-verified

19// complete or be aborted, or pool.Wait() will hang. That is typically done
20// using "defer bar.Abort(false)", which must be called BEFORE pool.Wait() is called.
21func (c *copier) newProgressPool() *mpb.Progress {
22 return mpb.New(mpb.WithWidth(40), mpb.WithOutput(c.progressOutput))
23}
24
25// customPartialBlobDecorFunc implements mpb.DecorFunc for the partial blobs retrieval progress bar
26func customPartialBlobDecorFunc(s decor.Statistics) string {

Callers 2

copyLayersMethod · 0.80
copyConfigMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected