blobs

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCompression = Gzip
View Source
var ErrNoBlobs = errors.Errorf("no blobs for snapshot")

Functions

func DetectLayerMediaType added in v0.6.4

func DetectLayerMediaType(ctx context.Context, cs content.Store, id digest.Digest, oci bool) (string, error)

DetectCompressionType returns media type from existing blob data.

func GetMediaTypeForLayers added in v0.6.4

func GetMediaTypeForLayers(diffPairs []DiffPair, ref cache.ImmutableRef) []string

GetMediaTypeForLayers retrieves media type for layer from ref information.

Types

type CompareWithParent added in v0.6.4

type CompareWithParent interface {
	CompareWithParent(ctx context.Context, ref string, opts ...diff.Opt) (ocispec.Descriptor, error)
}

type CompressionType added in v0.6.4

type CompressionType int

CompressionType represents compression type for blob data.

const (
	// Uncompressed indicates no compression.
	Uncompressed CompressionType = iota

	// Gzip is used for blob data.
	Gzip

	// UnknownCompression means not supported yet.
	UnknownCompression CompressionType = -1
)

func (CompressionType) String added in v0.6.4

func (ct CompressionType) String() string

type DiffPair

type DiffPair struct {
	DiffID  digest.Digest
	Blobsum digest.Digest
}

func GetDiffPairs

func GetDiffPairs(ctx context.Context, contentStore content.Store, differ diff.Comparer, ref cache.ImmutableRef, createBlobs bool, compression CompressionType) ([]DiffPair, error)

GetDiffPairs returns the DiffID/Blobsum pairs for a giver reference and saves it. Caller must hold a lease when calling this function.

Jump to

Keyboard shortcuts

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