Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootAssets ¶
type BootAssets struct {
Kernel io.ReadCloser
Initrd io.ReadCloser
Cmdline string
}
BootAssets contains kernel, initrd, and cmdline for kexec boot.
type ImageSource ¶
type ImageSource interface {
// Type returns the type of image source.
Type() ImageSourceType
// Reference returns the original image reference (path, URL, or container ref).
Reference() string
// GetBootAssets returns kernel, initrd, and cmdline for kexec boot.
GetBootAssets() (*BootAssets, error)
// GetInstallAssets returns data needed for installation.
GetInstallAssets(tmpDir string, sizeGiB uint64) (*InstallAssets, error)
// Close releases any resources held by the source.
Close() error
}
ImageSource is an abstraction over different image sources.
type ImageSourceType ¶
type ImageSourceType int
ImageSourceType represents the type of image source.
const ( ImageSourceContainer ImageSourceType = iota // Container registry image (e.g., ghcr.io/...) ImageSourceISO // ISO file (local or HTTP) ImageSourceRAW // RAW disk image (local or HTTP), possibly XZ compressed )
func (ImageSourceType) String ¶
func (t ImageSourceType) String() string
type InstallAssets ¶
type InstallAssets struct {
// For container/ISO: path to extracted rootfs with installer
RootfsPath string
// For RAW: reader for disk image (possibly decompressed)
DiskImage io.ReadCloser
DiskImageSize int64
// Cleanup function to call after installation
Cleanup func() error
}
InstallAssets contains data needed for installation.
Click to show internal directories.
Click to hide internal directories.