policy

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package policy defines update policies and resolves which image tag to pull.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindUpdateTarget

func FindUpdateTarget(ctx context.Context, image string, policy Policy) (string, error)

FindUpdateTarget resolves the best available tag for a policy.

func ParseImage added in v0.1.9

func ParseImage(img string) (repo, tag string, err error)

ParseImage parses a Docker image string and returns its repository, tag, and short name. It explicitly strips any trailing digest (e.g. @sha256:...) before parsing to ensure the tag information is not lost.

Types

type Policy

type Policy string

Policy defines how aggressively to update container images.

const (
	Digest Policy = "digest"
	Patch  Policy = "patch"
	Minor  Policy = "minor"
	Major  Policy = "major"
)

func Parse

func Parse(raw string) Policy

Parse normalizes and validates a policy string, falling back to Digest.

func ParseOr

func ParseOr(raw string, fallback Policy) Policy

ParseOr normalizes and validates a policy string, falling back to the given default.

func (Policy) IsValid

func (p Policy) IsValid() bool

func (Policy) String

func (p Policy) String() string

Jump to

Keyboard shortcuts

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