Help us shape the future of Go! Take the 2026 Go Developer Survey

imageref

package
v2.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package imageref contains shared image-reference parsing operations.

Index

Constants

View Source
const (
	// UpdateCheckLabel opts a container or service out of update checks and
	// notifications. Automatic installation is governed separately by the
	// updater label and the UI exclusion list.
	UpdateCheckLabel = "com.getarcaneapp.arcane.update-check"

	// UpdateDelayLabel overrides the environment's auto-update delay, in hours,
	// for a container or service. A value of 0 applies updates immediately.
	UpdateDelayLabel = "com.getarcaneapp.arcane.updater.delay"

	// MaxUpdateDelayHours caps the auto-update delay at one year, keeping it
	// within time.Duration.
	MaxUpdateDelayHours = 8760

	// LocalBuildRegistry is Arcane's reserved registry host for locally built image tags.
	LocalBuildRegistry = "arcane.local"
)

Variables

This section is empty.

Functions

func ConfiguredImage added in v2.17.0

func ConfiguredImage(ctx context.Context, dockerClient *client.Client, summary container.Summary) string

ConfiguredImage returns the image a container was created from. Docker lists a container whose image lost its tag by image ID, so the configured image is inspected only then; the listed name is the fallback.

func IsUpdateCheckDisabled added in v2.14.0

func IsUpdateCheckDisabled(labels map[string]string) bool

IsUpdateCheckDisabled reports whether labels opt the resource out of update monitoring. Checks stay enabled unless the value parses as false.

func ParseUpdateLookup

func ParseUpdateLookup(imageRef string) (originalRef, tag string, repositoryCandidates map[string]struct{}, ok bool)

ParseUpdateLookup normalizes an image reference into the repository and tag candidates used to match persisted update records.

func PullAsTag added in v2.16.1

func PullAsTag(ctx context.Context, dockerClient *client.Client, pulled, selected string, pull func(context.Context) error) error

PullAsTag runs pull for the immutable pulled reference, tags it as selected, and verifies the tag resolves to the pulled image. Both must name the same repository. The digest name is kept on purpose: removing it deletes the image on the containerd image store.

func RepoDigestRepository added in v2.17.0

func RepoDigestRepository(repoDigests []string) (string, bool)

RepoDigestRepository returns the repository of the first usable "repo@digest" entry in an image's RepoDigests.

func UpdateDelay added in v2.17.0

func UpdateDelay(labels map[string]string) (hours int, ok bool)

UpdateDelay returns the auto-update delay override in hours, capped at MaxUpdateDelayHours. ok is false when the label is absent or is not a non-negative integer.

func UpdatePolicyKey added in v2.11.0

func UpdatePolicyKey(imageRef string, labels map[string]string) string

UpdatePolicyKey identifies the configured reference, selection policy, and monitoring eligibility a stored check result belongs to. Automatic installation eligibility is deliberately not part of the key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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