package blobs
import "github.com/moby/buildkit/cache/blobs"
Index ¶
- Variables
- func DetectLayerMediaType(ctx context.Context, cs content.Store, id digest.Digest, oci bool) (string, error)
- func GetMediaTypeForLayers(diffPairs []DiffPair, ref cache.ImmutableRef) []string
- type CompareWithParent
- type CompressionType
- type DiffPair
Variables ¶
var DefaultCompression = Gzip
Functions ¶
func DetectLayerMediaType ¶
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 ¶
func GetMediaTypeForLayers(diffPairs []DiffPair, ref cache.ImmutableRef) []string
GetMediaTypeForLayers retrieves media type for layer from ref information.
Types ¶
type CompareWithParent ¶
type CompareWithParent interface { CompareWithParent(ctx context.Context, ref string, opts ...diff.Opt) (ocispec.Descriptor, error) }
type CompressionType ¶
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 ¶
func (ct CompressionType) String() string
type DiffPair ¶
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.
Source Files ¶
- Version
- v0.7.1
- Published
- Apr 16, 2020
- Platform
- js/wasm
- Imports
- 15 packages
- Last checked
- 12 hours ago –
Tools for package owners.