newImageSource creates a new ImageSource for the specified reference. The caller must call .Close() on the returned ImageSource.
(sys *types.SystemContext, ref openshiftReference)
| 37 | // newImageSource creates a new ImageSource for the specified reference. |
| 38 | // The caller must call .Close() on the returned ImageSource. |
| 39 | func 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. |
no test coverage detected
searching dependent graphs…