MCPcopy
hub / github.com/containerd/containerd / WithUsageManifestLimit

Function WithUsageManifestLimit

client/image.go:86–93  ·  view source on GitHub ↗

WithUsageManifestLimit sets the limit to the number of manifests which will be walked for usage. Setting this value to 0 will require all manifests to be walked, returning ErrNotFound if manifests are missing. NOTE: By default all manifests which exist will be walked and any non-existent manifests a

(i int)

Source from the content-addressed store, hash-verified

84// NOTE: By default all manifests which exist will be walked
85// and any non-existent manifests and their subobjects will be ignored.
86func WithUsageManifestLimit(i int) UsageOpt {
87 // If 0 then don't filter any manifests
88 // By default limits to current platform
89 return func(o *usageOptions) error {
90 o.manifestLimit = &i
91 return nil
92 }
93}
94
95// WithSnapshotUsage will check for referenced snapshots from the image objects
96// and include the snapshot size in the total usage.

Callers 1

TestImageUsageFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestImageUsageFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…