(ctx context.Context, sys *types.SystemContext)
| 36 | } |
| 37 | |
| 38 | func (b *BlobCache) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) { |
| 39 | src, err := b.reference.NewImageSource(ctx, sys) |
| 40 | if err != nil { |
| 41 | return nil, fmt.Errorf("error creating new image source %q: %w", transports.ImageName(b.reference), err) |
| 42 | } |
| 43 | logrus.Debugf("starting to read from image %q using blob cache in %q (compression=%v)", transports.ImageName(b.reference), b.directory, b.compress) |
| 44 | s := &blobCacheSource{reference: b, source: imagesource.FromPublic(src), sys: *sys} |
| 45 | s.Compat = impl.AddCompat(s) |
| 46 | return s, nil |
| 47 | } |
| 48 | |
| 49 | func (s *blobCacheSource) Reference() types.ImageReference { |
| 50 | return s.reference |
nothing calls this directly
no test coverage detected