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

Function newImageSource

openshift/openshift_src.go:39–53  ·  view source on GitHub ↗

newImageSource creates a new ImageSource for the specified reference. The caller must call .Close() on the returned ImageSource.

(sys *types.SystemContext, ref openshiftReference)

Source from the content-addressed store, hash-verified

37// newImageSource creates a new ImageSource for the specified reference.
38// The caller must call .Close() on the returned ImageSource.
39func newImageSource(sys *types.SystemContext, ref openshiftReference) (private.ImageSource, error) {
40 client, err := newOpenshiftClient(ref)
41 if err != nil {
42 return nil, err
43 }
44
45 s := &openshiftImageSource{
46 NoGetBlobAtInitialize: stubs.NoGetBlobAt(ref),
47
48 client: client,
49 sys: sys,
50 }
51 s.Compat = impl.AddCompat(s)
52 return s, nil
53}
54
55// Reference returns the reference used to set up this source, _as specified by the user_
56// (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

NoGetBlobAtFunction · 0.92
AddCompatFunction · 0.92
newOpenshiftClientFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…