images

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package images transfers CLI-managed OCI images between registries, local storage, and object storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheRoot

func CacheRoot() (string, error)

CacheRoot returns Podmin's XDG-compatible OCI cache root.

func CacheSize added in v0.2.0

func CacheSize(source, cacheRoot string) (int64, error)

CacheSize returns the total content bytes stored for source in the local OCI cache.

func Mirror

func Mirror(ctx context.Context, source, cacheRoot string, objects ObjectStore, progress tui.Progress) (string, error)

Mirror publishes a cached image beneath the setup-managed mirror namespace.

func Mirrored added in v0.2.0

func Mirrored(ctx context.Context, source, digest string, objects ObjectStore) (string, bool, error)

Mirrored reports whether the expected source digest is already published in the cluster mirror.

func ParseSource

func ParseSource(source string) (name.Tag, error)

ParseSource parses a tagged source reference.

func PublishMirrorIndex added in v0.2.1

func PublishMirrorIndex(ctx context.Context, source, cacheRoot string, objects ObjectStore) (string, error)

PublishMirrorIndex repairs mirror metadata from a complete local cache without uploading immutable blobs again.

func Pull

func Pull(ctx context.Context, source string, cacheRoot string, progress tui.Progress) error

Pull imports the complete source image or multi-platform index into cacheRoot.

func PullIfMissing added in v0.2.0

func PullIfMissing(ctx context.Context, source, digest, cacheRoot string, progress tui.Progress) error

PullIfMissing imports source unless the requested digest is cached and valid.

func Push

func Push(ctx context.Context, source, destination, cacheRoot string, refresh bool, objects ObjectStore, progress tui.Progress) (string, error)

Push uploads a cached OCI repository with immutable objects first and returns the normalized cluster image reference.

func ResolveDigest added in v0.2.0

func ResolveDigest(ctx context.Context, source string) (string, error)

ResolveDigest returns the current digest of a remote image reference.

func UploadSize added in v0.2.0

func UploadSize(source, cacheRoot string) (int64, error)

UploadSize returns the bytes uploaded for source's cached OCI repository.

Types

type ObjectStore

type ObjectStore interface {
	Get(context.Context, string) ([]byte, string, error)
	PutStream(context.Context, string, io.Reader, int64) error
	PutIfMatch(context.Context, string, []byte, string) error
}

ObjectStore is the object-storage contract required by image publication. Get returns an opaque version used to replace mutable index.json objects.

Jump to

Keyboard shortcuts

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