impl

package
v5.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compat

type Compat struct {
	// contains filtered or unexported fields
}

Compat implements the obsolete parts of types.ImageSource for implementations of private.ImageSource. See AddCompat below.

func AddCompat

func AddCompat(src private.ImageSourceInternalOnly) Compat

AddCompat initializes Compat to implement the obsolete parts of types.ImageSource for implementations of private.ImageSource.

Use it like this:

type yourSource struct {
	impl.Compat
	…
}

src := &yourSource{…}
src.Compat = impl.AddCompat(src)

func (*Compat) GetSignatures

func (c *Compat) GetSignatures(ctx context.Context, instanceDigest *digest.Digest) ([][]byte, error)

GetSignatures returns the image's signatures. It may use a remote (= slow) service. If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).

type DoesNotAffectLayerInfosForCopy

type DoesNotAffectLayerInfosForCopy struct{}

DoesNotAffectLayerInfosForCopy implements LayerInfosForCopy() that returns nothing.

func (DoesNotAffectLayerInfosForCopy) LayerInfosForCopy

func (stub DoesNotAffectLayerInfosForCopy) LayerInfosForCopy(ctx context.Context, instanceDigest *digest.Digest) ([]types.BlobInfo, error)

LayerInfosForCopy returns either nil (meaning the values in the manifest are fine), or updated values for the layer blobsums that are listed in the image's manifest. If values are returned, they should be used when using GetBlob() to read the image's layers. If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve BlobInfos for (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists). The Digest field is guaranteed to be provided; Size may be -1. WARNING: The list may contain duplicates, and they are semantically relevant.

type NoSignatures

type NoSignatures struct{}

NoSignatures implements GetSignatures() that returns nothing.

func (NoSignatures) GetSignaturesWithFormat

func (stub NoSignatures) GetSignaturesWithFormat(ctx context.Context, instanceDigest *digest.Digest) ([]signature.Signature, error)

GetSignaturesWithFormat returns the image's signatures. It may use a remote (= slow) service. If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve signatures for (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).

type Properties

type Properties struct {
	// HasThreadSafeGetBlob indicates whether GetBlob can be executed concurrently.
	HasThreadSafeGetBlob bool
}

Properties collects properties of an ImageSource that are constant throughout its lifetime (but might differ across instances).

type PropertyMethodsInitialize

type PropertyMethodsInitialize struct {
	// contains filtered or unexported fields
}

PropertyMethodsInitialize implements parts of private.ImageSource corresponding to Properties.

func PropertyMethods

func PropertyMethods(vals Properties) PropertyMethodsInitialize

PropertyMethods creates an PropertyMethodsInitialize for vals.

func (PropertyMethodsInitialize) HasThreadSafeGetBlob

func (o PropertyMethodsInitialize) HasThreadSafeGetBlob() bool

HasThreadSafeGetBlob indicates whether GetBlob can be executed concurrently.

Jump to

Keyboard shortcuts

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