Help us shape the future of Go! Take the 2026 Go Developer Survey

image

package
v0.30.25 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package image holds pure operations over v1.Image / v1.ImageIndex values that stand on their own (multi-arch resolution, future diff helpers, ...). Side-effecting I/O belongs in registry (remote) or imageio (disk).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResolvedSources

type ResolvedSources struct {
	Images  map[string]v1.Image
	Indices map[string]v1.ImageIndex
}

ResolvedSources holds per-reference results of resolving a list of remote sources. For indices that need to stay multi-arch (OCI layout without --platform) we store them in Indices; everything else ends up in Images already resolved to a single manifest.

func Resolve

func Resolve(ctx context.Context, srcList []string, keepMultiArchIndex bool, cachePath string, opts *registry.Options) (*ResolvedSources, error)

Resolve fetches each reference in srcList and classifies the result.

keepMultiArchIndex = true tells the resolver to keep an OCI index as an index when no --platform is pinned (pull-to-OCI layout wants full indices). Otherwise every source resolves to a single v1.Image for the current or pinned platform.

cachePath, when non-empty, wraps each returned image with a filesystem cache so layers re-used across pulls are kept on disk.

Duplicate srcList entries return an error rather than collapsing into a single map slot - otherwise downstream tarballs/layouts would silently drop one copy and surprise the user (`cr pull foo:1 foo:1 dst.tar` would yield a single-image tar, not two).

Jump to

Keyboard shortcuts

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