Documentation
¶
Overview ¶
Package imageref contains shared image-reference parsing operations.
Index ¶
- Constants
- func ConfiguredImage(ctx context.Context, dockerClient *client.Client, summary container.Summary) string
- func IsUpdateCheckDisabled(labels map[string]string) bool
- func ParseUpdateLookup(imageRef string) (originalRef, tag string, repositoryCandidates map[string]struct{}, ok bool)
- func PullAsTag(ctx context.Context, dockerClient *client.Client, pulled, selected string, ...) error
- func RepoDigestRepository(repoDigests []string) (string, bool)
- func UpdateDelay(labels map[string]string) (hours int, ok bool)
- func UpdatePolicyKey(imageRef string, labels map[string]string) string
Constants ¶
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
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
RepoDigestRepository returns the repository of the first usable "repo@digest" entry in an image's RepoDigests.
func UpdateDelay ¶ added in v2.17.0
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
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.