Documentation ¶
Index ¶
Constants ¶
const ( // targetRefLabel is a label which contains image reference. TargetRefLabel = "containerd.io/snapshot/remote/soci.reference" // TargetDigestLabel is a label which contains layer digest. TargetDigestLabel = "containerd.io/snapshot/remote/soci.digest" // TargetSizeLabel is a label which contains layer size. TargetSizeLabel = "containerd.io/snapshot/remote/soci.size" // targetImgManifestDigestLabel is a label which contains image manifest digest. TargetImgManifestDigestLabel = "containerd.io/snapshot/remote/image.manifest.digest" TargetSociIndexDigestLabel = "containerd.io/snapshot/remote/soci.index.digest" )
Variables ¶
This section is empty.
Functions ¶
func AppendDefaultLabelsHandlerWrapper ¶
func AppendDefaultLabelsHandlerWrapper(ref, indexDigest string) func(f images.Handler) images.Handler
AppendDefaultLabelsHandlerWrapper makes a handler which appends image's basic information to each layer descriptor as annotations during unpack. These annotations will be passed to this remote snapshotter as labels and used to construct source information.
Types ¶
type GetSources ¶
GetSources is a function for converting snapshot labels into typed blob sources information. This package defines a default converter which provides source information based on some labels but implementations aren't required to use labels. Implementations are allowed to return several sources (registry config + image refs) about the blob.
func FromDefaultLabels ¶
func FromDefaultLabels(hosts RegistryHosts) GetSources
FromDefaultLabels returns a function for converting snapshot labels to source information based on labels.
type RegistryHosts ¶
type RegistryHosts func(reference.Spec) ([]docker.RegistryHost, error)
RegistryHosts returns a list of registries that provides the specified image.
type Source ¶
type Source struct { // Hosts is a registry configuration where this blob is stored. Hosts RegistryHosts // Name is an image reference which contains this blob. Name reference.Spec // Target is a descriptor of this blob. Target ocispec.Descriptor // Manifest is an image manifest which contains the blob. This will // be used by the filesystem to pre-resolve some layers contained in // the manifest. // Currently, layer digest (Manifest.Layers.Digest) and size will be used. Manifest ocispec.Manifest }
Source is a typed blob source information. This contains information about a blob stored in registries and some contexts of the blob.