fixture

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package fixture builds local OCI images for Gantry integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Registry

func Registry(logger *slog.Logger) http.Handler

Registry answers anonymous registry-auth probes, but never serves image content. A peer-only pull cannot succeed through origin fallback.

Types

type Image

type Image struct {
	Descriptor ocispec.Descriptor
	Blobs      map[godigest.Digest][]byte
}

Image is a digest-addressed, multi-platform image graph. Its archive and digests depend only on the supplied binaries, not map order or wall-clock time.

func NewImage

func NewImage(binaries map[string][]byte, executable string) (*Image, error)

NewImage packages one static Linux executable per architecture in a scratch image. The executable is the entrypoint; no public base image is involved.

func (*Image) Archive

func (image *Image) Archive(ref string) ([]byte, error)

Archive returns an OCI image-layout tar suitable for ctr images import or kind load image-archive. Only the outer layout carries the import name.

func (*Image) Digests

func (image *Image) Digests() []godigest.Digest

Digests returns the entire graph in stable order, including the image index.

Directories

Path Synopsis
cmd
pause command
The fixture workload only needs to remain running after containerd unpacks it.
The fixture workload only needs to remain running after containerd unpacks it.
registry command

Jump to

Keyboard shortcuts

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