Documentation
¶
Overview ¶
Package resolver implements the 8-stage Strata resolution pipeline.
The resolver transforms a *spec.Profile into a *spec.LockFile. It wires registry.Client, probe.Client, and trust.RekorClient together into a deterministic, fail-fast pipeline.
No partial lockfiles: every stage is a clean pass or a hard stop with an actionable error. Callers either receive a fully populated LockFile or a *ResolutionError with stage, code, and a message pointing to the fix.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Registry is the layer catalog client. Required.
Registry registry.Client
// Probe resolves OS aliases to AMI IDs and BaseCapabilities. Required.
Probe *probe.Client
// Rekor is the transparency log client for Sigstore verification.
// Optional: when nil, bundle and Rekor entry presence are still required
// but no live API verification is performed.
Rekor trust.RekorClient
// StrataVersion is written into the resolved LockFile.
StrataVersion string
// Warnings is an optional writer for non-fatal diagnostic messages.
// If nil, warnings are silently discarded.
Warnings io.Writer
// AllowUnsignedOffline permits stage 7 to accept a layer with no Sigstore
// bundle or Rekor entry, warning instead of refusing. It exists for one
// caller: a resolve against the embedded, unsigned offline catalog (no
// registry configured), where refusing every layer means the shipped
// formations cannot be resolved even for local, non-trust use (#108). It is
// set only on that path; a resolve against a real registry leaves it false and
// stage 7 refuses an unsigned layer as before. An offline resolve is not a
// trust decision and the lockfile it produces is not signed.
AllowUnsignedOffline bool
}
Config holds the external dependencies for a Resolver.
type ResolutionError ¶
type ResolutionError struct {
Stage string
Code string
Message string
Available []string // e.g. available versions when a layer is not found
}
ResolutionError is a structured error produced by the resolver pipeline. It carries actionable context so users know exactly what failed and how to fix it.
func (*ResolutionError) Error ¶
func (e *ResolutionError) Error() string