registry

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package registry authenticates to container image registries and resolves remote image digests used by the stale-check logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CredentialsStore

func CredentialsStore(configFile configfile.ConfigFile) credentials.Store

CredentialsStore returns a new credentials store based on the settings provided in the configuration file.

func DefaultAuthHandler

func DefaultAuthHandler(_ context.Context) (string, error)

DefaultAuthHandler will be invoked if an AuthConfig is rejected It could be used to return a new value for the "X-Registry-Auth" authentication header, but there's no point trying again with the same value as used in AuthConfig

func EncodeAuth

func EncodeAuth(authConfig types.AuthConfig) (string, error)

EncodeAuth Base64 encode an AuthConfig struct for transmission over HTTP

func EncodedAuth

func EncodedAuth(ref string) (string, error)

EncodedAuth returns an encoded auth config for the given registry loaded from environment variables or docker config as available in that order

func EncodedConfigAuth

func EncodedConfigAuth(imageRef string) (string, error)

EncodedConfigAuth returns an encoded auth config for the given registry loaded from the docker config Returns an empty string if credentials cannot be found for the referenced server The docker config must be mounted on the container

func EncodedEnvAuth

func EncodedEnvAuth() (string, error)

EncodedEnvAuth returns an encoded auth config for the given registry loaded from environment variables Returns an error if authentication environment variables have not been set

func GetPullOptions

func GetPullOptions(imageName string) (image.PullOptions, error)

GetPullOptions creates a struct with all options needed for pulling images from a registry

func WarnOnAPIConsumption

func WarnOnAPIConsumption(container watchtowerTypes.Container) bool

WarnOnAPIConsumption will return true if the registry is known-expected to respond well to HTTP HEAD in checking the container digest -- or if there are problems parsing the container hostname. Will return false if behavior for container is unknown.

Types

This section is empty.

Directories

Path Synopsis
Package auth handles registry authentication and bearer-token challenges.
Package auth handles registry authentication and bearer-token challenges.
Package digest compares the current image digest to the latest one published in the registry to decide whether a container is stale.
Package digest compares the current image digest to the latest one published in the registry to decide whether a container is stale.
Package helpers holds registry-address resolution helpers shared across the registry sub-packages.
Package helpers holds registry-address resolution helpers shared across the registry sub-packages.
Package manifest builds registry manifest URLs for digest lookups.
Package manifest builds registry manifest URLs for digest lookups.
Package retry wraps registry HTTP requests in a bounded exponential backoff so a single flaky oauth/manifest response doesn't wedge an image for a full poll interval.
Package retry wraps registry HTTP requests in a bounded exponential backoff so a single flaky oauth/manifest response doesn't wedge an image for a full poll interval.
Package transport builds the http.Client used for registry API calls.
Package transport builds the http.Client used for registry API calls.

Jump to

Keyboard shortcuts

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