registry

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package registry provides options for remote OCI registry config and caching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRepoWithCustomConfig

func CreateRepoWithCustomConfig(ctx context.Context, rc *v1alpha1.RegistryConfig, ref string,
	cache *regcache.RegistryCache, userAgent string, credStore credentials.Store) (registry.Repository, error)

CreateRepoWithCustomConfig creates a remote.Repository object and sets it up based off the custom parameters defined in registryConfig (inside ace-dt config file).

func NewEndpointResolver

func NewEndpointResolver(resolver oras.GraphTarget, host string) oras.GraphTarget

NewEndpointResolver provides capabilities to overwrite the Registry portion of references passed to the Resolve method. Use ResolveEndpoint to determine the correct host.

func ParseEndpointOrDefault

func ParseEndpointOrDefault(targeter reg.GraphTargeter, reference string) (registry.Reference, error)

ParseEndpointOrDefault checks a GraphTargeter to see if parsing with endpoint resolution is necessary, defaulting to the oras registry.ParseReference.

func ResolveEndpoint

func ResolveEndpoint(rc *v1alpha1.RegistryConfig, ref registry.Reference) (*url.URL, error)

ResolveEndpoint checks for alternative registry endpoints in an RegistryConfig. It returns the original endpoint if one was not found. Currently only supports handling the first endpoint in the config.

Types

type EndpointGraphTargeter

type EndpointGraphTargeter interface {
	reg.GraphTargeter
	EndpointReferenceParser
}

EndpointGraphTargeter is a GraphTargeter that supports alternative reference endpoints.

type EndpointReferenceParser

type EndpointReferenceParser interface {
	ParseEndpointReference(reference string) (registry.Reference, error)
}

EndpointReferenceParser provides a method for parsing OCI references with alternate endpoint replacements.

type ReadOnlyEndpointGraphTargeter

type ReadOnlyEndpointGraphTargeter interface {
	reg.ReadOnlyGraphTargeter
	EndpointReferenceParser
}

ReadOnlyEndpointGraphTargeter is a ReadOnlyGraphTargeter that supports alternative reference endpoints.

Directories

Path Synopsis
Package cache implements tools for OCI registry caching.
Package cache implements tools for OCI registry caching.

Jump to

Keyboard shortcuts

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