Documentation
¶
Index ¶
- func FromCacheRegistry(registryURL string) bool
- func HasRegistryHost(imageRef string) bool
- func Match(a, b, registryURL string, fromCache bool) bool
- func MatchParamsOptional(registryURL string) (url string, fromCache bool)
- func Resolve(imageRef, registryURL string, fromCache bool) (string, []string)
- func ResolveForRegistry(imageName, registryURL string) (pullRef string, lookup []string, fromCache bool)
- func SanitizeRegistryHost(raw string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromCacheRegistry ¶
FromCacheRegistry reports whether registryURL is the special from_cache sentinel.
func HasRegistryHost ¶
HasRegistryHost returns true when imageRef already contains an explicit registry host. Docker reference heuristic: first component before '/' is considered a host when it contains '.' or ':' or equals localhost.
func Match ¶
Match reports whether two image refs refer to the same image when resolved against registryURL. fromCache mirrors launch/pull behavior for from_cache registries.
func MatchParamsOptional ¶
MatchParamsOptional returns registryURL and fromCache for image match/lookup. An empty registryURL uses fromCache=true (cache/drift lookup semantics).
func Resolve ¶
Resolve returns pull and lookup references for an image. - fromCache=true never mutates the returned pull ref (it is not used for pulling) - lookup refs include safe aliases to improve local cache matching.
func ResolveForRegistry ¶
func ResolveForRegistry(imageName, registryURL string) (pullRef string, lookup []string, fromCache bool)
ResolveForRegistry resolves pull and lookup refs for imageName against registryURL. fromCache mirrors pull vs from_cache registry behavior used across process manager.
func SanitizeRegistryHost ¶
SanitizeRegistryHost normalizes a registry URL-like value to a plain host[:port]. Examples:
- https://docker.io/ -> docker.io
- http://registry.local:5000/v2 -> registry.local:5000
Types ¶
This section is empty.