oci

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchContent

func FetchContent(ctx context.Context, resolver remotes.Resolver, ref string, desc ocispec.Descriptor) ([]byte, error)

FetchContent fetches the content of an OCI descriptor using the provided resolver. It validates the content size matches the descriptor and returns the raw bytes.

func FindManifestByArchitecture

func FindManifestByArchitecture(
	ctx context.Context,
	resolver remotes.Resolver,
	name string,
	desc ocispec.Descriptor,
	architecture string,
	opts FindManifestOptions,
) (ocispec.Manifest, error)

FindManifestByArchitecture navigates an OCI image index to find the manifest for a specific architecture. If opts.EnableCNAMECompat is true, it first tries to find a manifest using the legacy CNAME annotation approach.

Types

type FindManifestOptions

type FindManifestOptions struct {
	// EnableCNAMECompat enables a legacy manifest selection mode based on annotations.
	// This is currently only needed for backward compatibility with older PXE images.
	EnableCNAMECompat bool
	// CNAMEPrefix is the required prefix for the "cname" annotation when EnableCNAMECompat is set.
	CNAMEPrefix string
}

Jump to

Keyboard shortcuts

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