source

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendDefaultLabelsHandlerWrapper

func AppendDefaultLabelsHandlerWrapper(ref string, prefetchSize int64) 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.

func AppendExtraLabelsHandler added in v0.14.2

func AppendExtraLabelsHandler(prefetchSize int64, wrapper func(images.Handler) images.Handler) func(images.Handler) images.Handler

AppendExtraLabelsHandler adds optional labels that aren't provided by "github.com/containerd/containerd/pkg/snapshotters" but can be used for stargz snapshotter's extra functionalities.

Types

type GetSources

type GetSources func(labels map[string]string) (source []Source, err error)

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 added in v0.6.1

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, only layer digests (Manifest.Layers.Digest) 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL