Documentation
¶
Overview ¶
Package registry provides options for remote OCI registry config and caching.
Index ¶
- func CreateRepoWithCustomConfig(ctx context.Context, rc *v1alpha1.RegistryConfig, ref string, ...) (registry.Repository, error)
- func NewEndpointResolver(resolver oras.GraphTarget, host string) oras.GraphTarget
- func ParseEndpointOrDefault(targeter reg.GraphTargeter, reference string) (registry.Reference, error)
- func ResolveEndpoint(rc *v1alpha1.RegistryConfig, ref registry.Reference) (*url.URL, error)
- type EndpointGraphTargeter
- type EndpointReferenceParser
- type ReadOnlyEndpointGraphTargeter
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 ¶
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.