Documentation
¶
Overview ¶
Package ociresolve resolves an OCI source reference to its manifest descriptor without copying any bytes.
Used by image builds (containerimage handler) before any pull/push, to detect when the upstream digest matches the previous build and the build can be marked as a no-op. The resolver also lists tags, which build-time update-policy evaluation uses to semver-select a tag before resolving.
Resolve returns the manifest descriptor — for multi-platform images this is the manifest list (image index) descriptor, which is the right thing to content-address against because it remains stable across all platforms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver interface {
// Resolve fetches the manifest descriptor for srcTag in srcCfg. It does not
// pull any blob bytes — only the manifest is fetched. For multi-platform
// images this returns the image index descriptor.
//
// Errors are returned for 404 (tag not found), auth failures, and network
// problems. Callers translate these into structured failures surfaced to
// the user via sync errors.
Resolve(ctx context.Context, srcCfg *configs.OCIRegistryRepository, srcTag string) (*ocispec.Descriptor, error)
// Tags lists every tag visible in srcCfg's repository. Used at build
// time: when a component config sets an `update_policy` semver
// constraint, the build planner lists tags then semver-selects the
// highest match before resolving it to a digest.
//
// Tags are returned in registry-defined order (the order returned by
// the underlying registry's tag-listing API). Callers must not rely on
// any particular ordering. The returned slice may be empty when the
// repository exists but contains no tags.
Tags(ctx context.Context, srcCfg *configs.OCIRegistryRepository) ([]string, error)
}
Resolver resolves a source ref to its manifest descriptor.
func New ¶
func New(params ResolverParams) Resolver