Documentation
¶
Overview ¶
Package registry is a deliberately minimal OCI registry client for digest observation: resolve what digest a tag points at, per platform. It is read-only, https-only, anonymous-or-bearer-token only, and fail closed. It never pulls image content.
The index-resolution paths (platform match, ARM variant match) are differential-tested against google/go-containerregistry in differential_test.go. Known deliberate divergence: on zero or multiple platform matches this client errors, where go-containerregistry's WithPlatform has its own fallback behavior.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client resolves image digests over the registry HTTP API.
func (*Client) ResolveDigest ¶
func (c *Client) ResolveDigest(image domain.ImageReference) (string, error)
ResolveDigest returns the digest the image's tag currently points at, from the Docker-Content-Digest header of a HEAD request. For a multi-arch image this is the index digest; use ResolvePlatformDigest to match what a single-platform engine reports as running.
func (*Client) ResolvePlatformDigest ¶
func (c *Client) ResolvePlatformDigest(image domain.ImageReference, platform Platform) (string, error)
ResolvePlatformDigest returns the manifest digest for one platform. For an index, exactly one child manifest must match the platform; for a single manifest, the image config's platform is verified against the request and a mismatch is an error.
type Option ¶
type Option func(*Client)
Option configures a Client.
func WithHTTPClient ¶
WithHTTPClient replaces the underlying HTTP client (tests inject a fake transport here).