externaltoc

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 26 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LayerConvertFunc

func LayerConvertFunc(esgzOpts []estargz.Option, compressionLevel int) (convertFunc converter.ConvertFunc, finalize func(ctx context.Context, cs content.Store, ref string, desc *ocispec.Descriptor) (*images.Image, error))

LayerConvertFunc converts legacy tar.gz layers into eStargz tar.gz layers.

finalize() callback function returned by this function will return the image that contains external TOC of each layer. Note that the returned image by isn't stored to the containerd image store so far so the caller needs to do it.

Media type is unchanged.

Should be used in conjunction with WithDockerToOCI().

Otherwise "containerd.io/snapshot/stargz/toc.digest" annotation will be lost, because the Docker media type does not support layer annotations.

WithCompression() in esgzOpts will be ignored but used the one for external TOC instead.

func LayerConvertLossLessFunc

func LayerConvertLossLessFunc(cfg LayerConvertLossLessConfig) (convertFunc converter.ConvertFunc, finalize func(ctx context.Context, cs content.Store, ref string, desc *ocispec.Descriptor) (*images.Image, error))

LayerConvertLossLessFunc converts legacy tar.gz layers into eStargz tar.gz layers without changing the diffIDs (i.e. uncompressed digest).

finalize() callback function returned by this function will return the image that contains external TOC of each layer. Note that the returned image by isn't stored to the containerd image store so far so the caller needs to do it.

Media type is unchanged.

Should be used in conjunction with WithDockerToOCI().

Otherwise "containerd.io/snapshot/stargz/toc.digest" annotation will be lost, because the Docker media type does not support layer annotations.

WithCompression() in esgzOpts will be ignored but used the one for external TOC instead.

func LayerConvertWithLayerAndCommonOptsFunc

func LayerConvertWithLayerAndCommonOptsFunc(opts map[digest.Digest][]estargz.Option, commonOpts []estargz.Option, compressionLevel int) (convertFunc converter.ConvertFunc, finalize func(ctx context.Context, cs content.Store, ref string, desc *ocispec.Descriptor) (*images.Image, error))

LayerConvertWithLayerAndCommonOptsFunc converts legacy tar.gz layers into eStargz. Media type is unchanged. Should be used in conjunction with WithDockerToOCI(). See LayerConvertFunc for more details. The difference between this function and LayerConvertFunc is that this allows to specify additional eStargz options per layer.

Types

type LayerConvertLossLessConfig

type LayerConvertLossLessConfig struct {
	CompressionLevel int
	ChunkSize        int
	MinChunkSize     int
}

LayerConvertLossLessConfig is configuration for LayerConvertLossLessFunc.

Jump to

Keyboard shortcuts

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