// LayerConvertWithLayerOptsFunc converts legacy tar.gz layers into zstd:chunked layers.
//
// This changes Docker MediaType to OCI MediaType so this 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.
LayerConvertWithLayerOptsFunc converts legacy tar.gz layers into zstd:chunked layers.

This changes Docker MediaType to OCI MediaType so this 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.
// LayerConvertWithLayerOptsFunc converts legacy tar . gz layers into zstd : chunked layers . // // This changes Docker MediaType to OCI MediaType so this 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 LayerConvertWithLayerOptsFunc(opts map[digest.Digest][]estargz.Option) converter.ConvertFunc {
	if opts == nil {
		return LayerConvertFunc()
	}
	return func(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (*ocispec.Descriptor, error) {
		return LayerConvertFunc(opts[desc.Digest]...)(ctx, cs, desc)
	}
}
func LayerConvertWithLayerOptsFunc ( opts map [ digest . Digest ] [ ] estargz . Option ) converter . ConvertFunc { if opts == nil { return LayerConvertFunc ( ) } return func ( ctx context . Context , cs content . Store , desc ocispec . Descriptor ) ( * ocispec . Descriptor , error ) { return LayerConvertFunc ( opts [ desc . Digest ] ... ) ( ctx , cs , desc ) } }
LayerConvertWithLayerOptsFunc converts legacy tar.gz layers into zstd:chunked layers.
LayerConvertWithLayerOptsFunc converts legacy tar . gz layers into zstd : chunked layers .
// TODO: enable to speciy option per layer "index" because it's possible that there are //       two layers having same digest in an image (but this should be rare case)