manifests

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 21 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrListImageUnknown = stderrors.New("unable to determine which image holds the manifest list")

ErrListImageUnknown is returned when we attempt to create an image reference for a List that has not yet been saved to an image.

Functions

func LockerForImage added in v0.42.0

func LockerForImage(store storage.Store, image string) (lockfile.Locker, error)

LockerForImage returns a Locker for a given image record. It's recommended that processes which use LoadFromImage() to load a list from an image and then use that list's SaveToImage() method to save a modified version of the list to that image record use this lock to avoid accidentally wiping out changes that another process is also attempting to make.

Types

type List

type List interface {
	manifests.List
	SaveToImage(store storage.Store, imageID string, names []string, mimeType string) (string, error)
	Reference(store storage.Store, multiple cp.ImageListSelection, instances []digest.Digest) (types.ImageReference, error)
	Push(ctx context.Context, dest types.ImageReference, options PushOptions) (reference.Canonical, digest.Digest, error)
	Add(ctx context.Context, sys *types.SystemContext, ref types.ImageReference, all bool) (digest.Digest, error)
}

List is a manifest list or image index, either created using Create(), or loaded from local storage using LoadFromImage().

func Create

func Create() List

Create creates a new list containing information about the specified image, computing its manifest's digest, and retrieving OS and architecture information from its configuration blob. Returns the new list, and the instanceDigest for the initial image.

func LoadFromImage

func LoadFromImage(store storage.Store, image string) (string, List, error)

LoadFromImage reads the manifest list or image index, and additional information about where the various instances that it contains live, from an image record with the specified ID in local storage.

type PushOptions

type PushOptions struct {
	Store              storage.Store
	SystemContext      *types.SystemContext  // github.com/containers/image/types.SystemContext
	ImageListSelection cp.ImageListSelection // set to either CopySystemImage, CopyAllImages, or CopySpecificImages
	Instances          []digest.Digest       // instances to copy if ImageListSelection == CopySpecificImages
	ReportWriter       io.Writer             // will be used to log the writing of the list and any blobs
	SignBy             string                // fingerprint of GPG key to use to sign images
	RemoveSignatures   bool                  // true to discard signatures in images
	ManifestType       string                // the format to use when saving the list - possible options are oci, v2s1, and v2s2
}

PushOptions includes various settings which are needed for pushing the manifest list and its instances.

Jump to

Keyboard shortcuts

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