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

Function newImageSource

directory/directory_src.go:29–40  ·  view source on GitHub ↗

newImageSource returns an ImageSource reading from an existing directory. The caller must call .Close() on the returned ImageSource.

(ref dirReference)

Source from the content-addressed store, hash-verified

27// newImageSource returns an ImageSource reading from an existing directory.
28// The caller must call .Close() on the returned ImageSource.
29func newImageSource(ref dirReference) private.ImageSource {
30 s := &dirImageSource{
31 PropertyMethodsInitialize: impl.PropertyMethods(impl.Properties{
32 HasThreadSafeGetBlob: false,
33 }),
34 NoGetBlobAtInitialize: stubs.NoGetBlobAt(ref),
35
36 ref: ref,
37 }
38 s.Compat = impl.AddCompat(s)
39 return s
40}
41
42// Reference returns the reference used to set up this source, _as specified by the user_
43// (not as the image itself, or its underlying storage, claims). This can be used e.g. to determine which public keys are trusted for this image.

Callers 1

NewImageSourceMethod · 0.70

Calls 3

PropertyMethodsFunction · 0.92
NoGetBlobAtFunction · 0.92
AddCompatFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…