sysregistriesv2

package
v0.0.0-...-b9be53e Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2037 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidRegistries

type InvalidRegistries struct {
	// contains filtered or unexported fields
}

InvalidRegistries represents an invalid registry configurations. An example is when "registry.com" is defined multiple times in the configuration but with conflicting security settings.

func (*InvalidRegistries) Error

func (e *InvalidRegistries) Error() string

Error returns the error string.

type Mirror

type Mirror struct {
	// The mirror's URL.
	URL string `toml:"url"`
	// If true, certs verification will be skipped and HTTP (non-TLS)
	// connections will be allowed.
	Insecure bool `toml:"insecure"`
}

Mirror represents a mirror. Mirrors can be used as pull-through caches for registries.

type Registry

type Registry struct {
	// Serializable registry URL.
	URL string `toml:"url"`
	// The registry's mirrors.
	Mirrors []Mirror `toml:"mirror"`
	// If true, pulling from the registry will be blocked.
	Blocked bool `toml:"blocked"`
	// If true, certs verification will be skipped and HTTP (non-TLS)
	// connections will be allowed.
	Insecure bool `toml:"insecure"`
	// If true, the registry can be used when pulling an unqualified image.
	Search bool `toml:"unqualified-search"`
	// Prefix is used for matching images, and to translate one namespace to
	// another.  If `Prefix="example.com/bar"`, `URL="example.com/foo/bar"`
	// and we pull from "example.com/bar/myimage:latest", the image will
	// effectively be pulled from "example.com/foo/bar/myimage:latest".
	// If no Prefix is specified, it defaults to the specified URL.
	Prefix string `toml:"prefix"`
}

Registry represents a registry.

func FindRegistry

func FindRegistry(ref string, registries []Registry) *Registry

FindRegistry returns the Registry with the longest prefix for ref. If no Registry prefixes the image, nil is returned.

func FindUnqualifiedSearchRegistries

func FindUnqualifiedSearchRegistries(registries []Registry) []Registry

FindUnqualifiedSearchRegistries returns all registries that are configured for unqualified image search (i.e., with Registry.Search == true).

func GetRegistries

func GetRegistries(ctx *types.SystemContext) ([]Registry, error)

GetRegistries loads and returns the registries specified in the config.

Jump to

Keyboard shortcuts

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