package tool
import "github.com/containerd/nydus-snapshotter/pkg/converter/tool"
Index ¶
- func GetHelp(builder string) []byte
- func Merge(option MergeOption) ([]digest.Digest, error)
- func Pack(option PackOption) error
- func Unpack(option UnpackOption) error
- type Feature
- type Features
- func DetectFeatures(builder string, required Features, getHelp func(string) []byte) (Features, error)
- func NewFeatures(items ...Feature) Features
- func (features *Features) Add(items ...Feature)
- func (features *Features) Contains(feature Feature) bool
- func (features *Features) Equals(other Features) bool
- func (features *Features) Remove(items ...Feature)
- type MergeOption
- type PackOption
- type UnpackOption
Functions ¶
func GetHelp ¶
GetHelp returns the help message of `nydus-image create`.
func Merge ¶
func Merge(option MergeOption) ([]digest.Digest, error)
func Pack ¶
func Pack(option PackOption) error
func Unpack ¶
func Unpack(option UnpackOption) error
Types ¶
type Feature ¶
type Feature string
const ( // The option `--type tar-rafs` enables converting OCI tar blob // stream into nydus blob directly, the tar2rafs eliminates the // need to decompress it to a local directory first, thus greatly // accelerating the pack process. FeatureTar2Rafs Feature = "--type tar-rafs" // The option `--batch-size` enables merging multiple small chunks // into a big batch chunk, which can reduce the the size of the image // and accelerate the runtime file loading. FeatureBatchSize Feature = "--batch-size" // The option `--encrypt` enables converting directories, tar files // or OCI images into encrypted nydus blob. FeatureEncrypt Feature = "--encrypt" )
type Features ¶
type Features map[Feature]struct{}
func DetectFeatures ¶
func DetectFeatures(builder string, required Features, getHelp func(string) []byte) (Features, error)
DetectFeatures returns supported feature list from required feature list. The supported feature list is detected from the help message of `nydus-image create`.
func NewFeatures ¶
func (*Features) Add ¶
func (*Features) Contains ¶
func (*Features) Equals ¶
func (*Features) Remove ¶
type MergeOption ¶
type MergeOption struct { BuilderPath string SourceBootstrapPaths []string RafsBlobDigests []string RafsBlobTOCDigests []string RafsBlobSizes []int64 TargetBootstrapPath string ChunkDictPath string ParentBootstrapPath string PrefetchPatterns string OutputJSONPath string Timeout *time.Duration }
type PackOption ¶
type PackOption struct { BuilderPath string BootstrapPath string BlobPath string FsVersion string SourcePath string ChunkDictPath string PrefetchPatterns string Compressor string OCIRef bool AlignedChunk bool ChunkSize string BatchSize string Encrypt bool Timeout *time.Duration Features Features }
type UnpackOption ¶
type UnpackOption struct { BuilderPath string BootstrapPath string BlobPath string BackendConfigPath string TarPath string Timeout *time.Duration }
Source Files ¶
- Version
- v0.15.2 (latest)
- Published
- May 26, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 1 day ago –
Tools for package owners.