imagepreparation

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func CancelSandboxPreparations added in v0.32.0

func CancelSandboxPreparations(ctx context.Context, tx pgx.Tx, sandboxID string, now time.Time) (bool, error)

Call with the Sandbox/Workspace locked and compute admission revoked. Preparation only fills the immutable image cache; it never owns a Workspace writer.

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.

func SandboxStartOperationID added in v0.32.0

func SandboxStartOperationID(metadata []byte, legacyEffectID string) (string, error)

Types

type Payload

type Payload struct {
	Role             string   `json:"role"`
	Targets          []Target `json:"targets,omitempty"`
	StartOperationID string   `json:"startOperationId,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