Documentation
¶
Overview ¶
Package oci is the minimal OCI distribution client agent-manager needs: anonymous pulls with the registry's bearer-token challenge (RFC 6750 style Www-Authenticate), the tag list of a repository, one file out of a Helm chart archive, and the digest a tag resolves to — the way Flux's source-controller reads the agent chart, and the way a tagged skill image is pinned to the digest kagent requires.
Index ¶
Constants ¶
const (
// HelmChartLayerMediaType is the media type of a chart archive layer.
HelmChartLayerMediaType = "application/vnd.cncf.helm.chart.content.v1.tar+gzip"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageReference ¶
ImageReference is a parsed image reference: <host>/<repository>[:<tag>][@<digest>].
func ParseImageReference ¶
func ParseImageReference(ref string) (ImageReference, error)
ParseImageReference parses <host>/<repository>[:<tag>][@sha256:<digest>]. The registry host is required (no Docker Hub defaulting): a skill reference names where it comes from.
func (ImageReference) Pinned ¶
func (r ImageReference) Pinned() string
Pinned renders the reference by digest, the immutable form.
type Reference ¶
type Reference struct {
// Host is the registry host, e.g. gsoci.azurecr.io.
Host string
// Repository is the path within the registry, e.g. charts/giantswarm/agent.
Repository string
// Insecure selects plain HTTP (tests).
Insecure bool
}
Reference is a parsed registry repository.
func ParseChartURL ¶
ParseChartURL parses oci://<host>/<repository>, the form a Flux OCIRepository carries.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry talks to OCI registries.
func NewRegistry ¶
NewRegistry builds a client with sensible timeouts.
func (*Registry) ManifestDigest ¶
ManifestDigest resolves a tag to the digest of its manifest: the registry's Docker-Content-Digest on a HEAD, else the sha256 of the manifest body.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ocitest is a fake OCI distribution registry for tests: one repository behind a bearer challenge, a tag list, one manifest per tag with a Docker-Content-Digest, and a chart archive per tag as the single blob.
|
Package ocitest is a fake OCI distribution registry for tests: one repository behind a bearer challenge, a tag list, one manifest per tag with a Docker-Content-Digest, and a chart archive per tag as the single blob. |