Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(components *ComponentList, dest string) error
Generate generates and saves the container image prefetch script to disk based on the specified component list and destination path.
Types ¶
type ComponentList ¶
type ComponentList struct {
Images []Image `json:"ContainerImages,omitempty"`
}
List represents a component list (e.g. parts/linux/cloud-init/artifacts/components.json).
func ParseComponents ¶
func ParseComponents(name string) (*ComponentList, error)
ParseComponents parses the named component list JSON and returns its content as a ComponentList.
type Image ¶
type Image struct { DownloadURL string `json:"downloadURL,omitempty"` AMD64OnlyVersions []string `json:"amd64OnlyVersions,omitempty"` MultiArchVersions []string `json:"multiArchVersions,omitempty"` MultiArchVersionsV2 []struct { RenovateTag string `json:"renovateTag"` LatestVersion string `json:"latestVersion"` PreviousLatestVersion string `json:"previousLatestVersion"` } `json:"multiArchVersionsV2"` PrefetchOptimizations []struct { Tag string `json:"version,omitempty"` Binaries []string `json:"binaries,omitempty"` } `json:"prefetchOptimizations,omitempty"` }
Image represents a container image within a component list.
func (*Image) IsKnownVersion ¶
IsImageVersion returns true iff the specified version is contained within the image's multi-arch or amd64-only versions, false otherwise.
type TemplateArgs ¶
type TemplateArgs struct {
Images []TemplateImage
}
PrefetchTemplateArgs represents the arguments required by the prefetch script template.
type TemplateImage ¶
TemplateImage represents a container image in terms of its fully-qualified tag, as well as the list of binaries within it that are in-scope for prefetch optimization. This is used to execute the prefetch template for script generation.