Documentation
¶
Index ¶
- type BlobDownloader
- func (bd *BlobDownloader) DownloadBlobs(ctx context.Context, layers []v1.Layer, imageRef string, maxConcurrency int) ([]DownloadResult, error)
- func (bd *BlobDownloader) DownloadBlobsWithProgress(ctx context.Context, layers []v1.Layer, imageRef string, maxConcurrency int, ...) ([]DownloadResult, error)
- func (bd *BlobDownloader) GetCachedBlobReader(digest string) (io.ReadCloser, error)
- type DownloadProgressCallback
- type DownloadResult
- type Fetcher
- func (f *Fetcher) FetchImageMetadata(ctx context.Context, imageRef string, platformSpec string) (*ImageMetadata, error)
- func (f *Fetcher) ListTags(ctx context.Context, repository string) ([]string, error)
- func (f *Fetcher) ResolveTag(ctx context.Context, repository, tagInput string) (string, []string, error)
- type ImageMetadata
- type LayerMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobDownloader ¶ added in v0.6.2
type BlobDownloader struct {
// contains filtered or unexported fields
}
BlobDownloader handles downloading compressed blobs from registry
func NewBlobDownloader ¶ added in v0.6.2
func NewBlobDownloader(blobCache *cache.BlobCache) *BlobDownloader
NewBlobDownloader creates a new blob downloader
func (*BlobDownloader) DownloadBlobs ¶ added in v0.6.2
func (bd *BlobDownloader) DownloadBlobs(ctx context.Context, layers []v1.Layer, imageRef string, maxConcurrency int) ([]DownloadResult, error)
DownloadBlobs downloads multiple blobs in parallel layers: the layers to download (from go-containerregistry) imageRef: the source image reference (for cache tracking) maxConcurrency: maximum number of concurrent downloads (0 = unlimited)
func (*BlobDownloader) DownloadBlobsWithProgress ¶ added in v0.6.2
func (bd *BlobDownloader) DownloadBlobsWithProgress( ctx context.Context, layers []v1.Layer, imageRef string, maxConcurrency int, progressCallback DownloadProgressCallback, ) ([]DownloadResult, error)
DownloadBlobsWithProgress downloads blobs with progress reporting
func (*BlobDownloader) GetCachedBlobReader ¶ added in v0.6.2
func (bd *BlobDownloader) GetCachedBlobReader(digest string) (io.ReadCloser, error)
GetCachedBlobReader returns a reader for a cached blob
type DownloadProgressCallback ¶ added in v0.6.2
DownloadProgressCallback is called with progress updates
type DownloadResult ¶ added in v0.6.2
DownloadResult represents the result of a blob download
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher handles fetching image metadata from remote registries
func NewFetcher ¶
NewFetcher creates a new Fetcher with the given options
func (*Fetcher) FetchImageMetadata ¶
func (f *Fetcher) FetchImageMetadata(ctx context.Context, imageRef string, platformSpec string) (*ImageMetadata, error)
FetchImageMetadata retrieves image metadata from a remote registry without downloading layers
func (*Fetcher) ResolveTag ¶ added in v0.6.9
func (f *Fetcher) ResolveTag(ctx context.Context, repository, tagInput string) (string, []string, error)
ResolveTag resolves a tag input to an exact tag. Priority: 1. Exact match - if tag exists as-is, return it 2. Fuzzy match - find tags containing the input
- If exactly one match, return it
- If multiple matches, return ("", matches, nil) for user selection
- If no matches, return error
type ImageMetadata ¶
type ImageMetadata struct {
Reference string
Platform string
Digest v1.Hash
Layers []LayerMetadata
TotalSize int64
ConfigFile *v1.ConfigFile
}
ImageMetadata contains metadata about a container image fetched from a registry