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

archguard

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package archguard checks image platforms before a remote deploy changes a host.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegistryLookup

func RegistryLookup(ctx context.Context, ref string) (map[string]string, error)

RegistryLookup inspects an index without pulling any image.

Types

type ImageRef

type ImageRef struct {
	Service string
	Ref     string
	Build   bool
}

ImageRef is a compose service's image and build-context status.

type Lookup

type Lookup func(context.Context, string) (map[string]string, error)

Lookup returns the platforms published by a registry reference.

type Mismatch

type Mismatch struct {
	Service string
	Image   string
	Arch    string
	Reason  string
}

Mismatch records an image that cannot be proved to run on a host.

func Check

func Check(ctx context.Context, images []ImageRef, arch string, lookup Lookup) ([]Mismatch, error)

Check checks each distinct image. Locked references use embedded platform data; other references use lookup. Errors are returned as unknown mismatches.

Jump to

Keyboard shortcuts

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