imagepreparation

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Deadline = 30 * time.Minute
View Source
const MaximumTargets = 16

Variables

This section is empty.

Functions

func Queue

func Queue(ctx context.Context, tx pgx.Tx, effectID, operationID, tenant, reference, runner string, payload Payload, now, deadline time.Time) error

func RecordResolvedPreparation

func RecordResolvedPreparation(ctx context.Context, tx pgx.Tx, effectID, operationID, runner string, evidence []byte, now, deadline time.Time) error

RecordResolvedPreparation counts the resolve Runner's completed fetch as that Runner's preparation. It carries the resolve evidence and sends no second command, so one Runner never retrieves the same digest twice.

Types

type Payload

type Payload struct {
	Role    string   `json:"role"`
	Targets []Target `json:"targets,omitempty"`
}

type Target

type Target struct {
	RunnerID      string   `json:"runnerId"`
	Architectures []string `json:"architectures"`
}

func ResolveTarget

func ResolveTarget(targets []Target) Target

ResolveTarget selects the captured Runner that resolves and verifies the reference. Its fetch also prepares that Runner, so the widest architecture coverage is chosen: a Runner outside the resolved image's architecture keeps no prepared bytes the Operation can count.

Jump to

Keyboard shortcuts

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