MCPcopy
hub / github.com/containerd/containerd / WithProgress

Function WithProgress

core/diff/diff.go:143–150  ·  view source on GitHub ↗

WithProgress is used to indicate process of the apply operation, should at least expect a progress of 0 and of the final size. It is up to the applier how much progress it reports in between.

(f func(ocispec.Descriptor, int64))

Source from the content-addressed store, hash-verified

141// at least expect a progress of 0 and of the final size. It is up to the applier
142// how much progress it reports in between.
143func WithProgress(f func(ocispec.Descriptor, int64)) ApplyOpt {
144 return func(_ context.Context, desc ocispec.Descriptor, c *ApplyConfig) error {
145 c.Progress = func(state int64) {
146 f(desc, state)
147 }
148 return nil
149 }
150}
151
152// WithSourceDateEpoch specifies the timestamp used to provide control for reproducibility.
153// See also https://reproducible-builds.org/docs/source-date-epoch/ .

Callers 1

pullMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…