Documentation ¶
Index ¶
Constants ¶
const ( // TargetSizeLabel is a label which contains layer size. TargetSizeLabel = "containerd.io/snapshot/remote/soci.size" // TargetSociIndexDigestLabel is a label which contains the digest of the soci index. TargetSociIndexDigestLabel = "containerd.io/snapshot/remote/soci.index.digest" )
Variables ¶
This section is empty.
Functions ¶
func AppendDefaultLabelsHandlerWrapper ¶
func AppendDefaultLabelsHandlerWrapper(indexDigest string, wrapper func(images.Handler) images.Handler) 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 resolver.RegistryHosts) GetSources
FromDefaultLabels returns a function for converting snapshot labels to source information based on labels.
type Source ¶
type Source struct { // Hosts provides a list registry configurations for remotes that contains this blob. Hosts []docker.RegistryHost // 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.