references

package
v1.29.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegistryImageReference

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

RegistryImageReference is a name of a specific image location on a registry. The image may or may not exist, and, in general, what image the name points to may change over time.

More specifically: - The name always specifies a registry; it is not an alias nor a short name input to a search - The name contains a tag or digest; it does not specify just a repo.

This is intended to be a value type; if a value exists, it contains a valid reference.

func ParseRegistryImageReferenceFromOutOfProcessData

func ParseRegistryImageReferenceFromOutOfProcessData(input string) (RegistryImageReference, error)

ParseRegistryImageReferenceFromOutOfProcessData constructs a RegistryImageReference from a string.

It is only intended for communication with OUT-OF-PROCESS APIs, like registry references provided by CRI by Kubelet.

func RegistryImageReferenceFromRaw

func RegistryImageReferenceFromRaw(rawNamed reference.Named) RegistryImageReference

RegistryImageReferenceFromRaw is an internal constructor of a RegistryImageReference.

This should only be called from internal/storage. It’s the caller’s responsibility to provide a valid value (!IsNameOnly, and registry-qualified)

func (RegistryImageReference) Format

func (ref RegistryImageReference) Format(f fmt.State, verb rune)

Format() is implemented so that log entries can be written, without providing a convenient String() method.

func (RegistryImageReference) Raw

Raw returns the underlying reference.Named.

The return value is !IsNameOnly, and the repo is registry-qualified.

This should only be called from internal/storage.

func (RegistryImageReference) Registry

func (ref RegistryImageReference) Registry() string

Registry returns the host[:port] part of the reference

func (RegistryImageReference) StringForOutOfProcessConsumptionOnly

func (ref RegistryImageReference) StringForOutOfProcessConsumptionOnly() string

StringForOutOfProcessConsumptionOnly is only intended for communication with OUT-OF-PROCESS APIs, like image names in CRI status objects.

RegistryImageReference intentionally does not implement String(). Use typed values wherever possible.

Jump to

Keyboard shortcuts

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