remote

package
v0.6.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

type DownloadProgressCallback func(completed, total int, currentBlob string)

DownloadProgressCallback is called with progress updates

type DownloadResult added in v0.6.2

type DownloadResult struct {
	Digest    string
	DiffID    string
	Size      int64
	FromCache bool
	Err       error
}

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

func NewFetcher(opts ...remote.Option) *Fetcher

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) ListTags added in v0.6.9

func (f *Fetcher) ListTags(ctx context.Context, repository string) ([]string, error)

ListTags lists all tags for a given repository

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

type LayerMetadata

type LayerMetadata struct {
	DiffID  v1.Hash
	Digest  v1.Hash
	Size    int64
	Command string // The Docker command that created this layer
}

LayerMetadata contains information about a single image layer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL