Documentation ¶
Index ¶
- func LayerConvertFunc(esgzOpts []estargz.Option, compressionLevel int) (convertFunc converter.ConvertFunc, ...)
- func LayerConvertLossLessFunc(cfg LayerConvertLossLessConfig) (convertFunc converter.ConvertFunc, ...)
- func LayerConvertWithLayerAndCommonOptsFunc(opts map[digest.Digest][]estargz.Option, commonOpts []estargz.Option, ...) (convertFunc converter.ConvertFunc, ...)
- func NewRemoteDecompressor(ctx context.Context, hosts source.RegistryHosts, refspec reference.Spec, ...) *esgzexternaltoc.GzipDecompressor
- type LayerConvertLossLessConfig
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.
func NewRemoteDecompressor ¶
func NewRemoteDecompressor(ctx context.Context, hosts source.RegistryHosts, refspec reference.Spec, desc ocispec.Descriptor) *esgzexternaltoc.GzipDecompressor
Types ¶
type LayerConvertLossLessConfig ¶
LayerConvertLossLessConfig is configuration for LayerConvertLossLessFunc.