Documentation
¶
Index ¶
- Constants
- func BuildDiskRun(cfg *v1.BuildConfig, spec *v1.RawDiskArchEntry, imgType string, ...) error
- func ChrootHook(config *v1.Config, hook string, strict bool, chrootDir string, ...) (err error)
- func CreateFinalImage(c *v1.BuildConfig, img string, parts ...string) error
- func CreatePart(c *v1.BuildConfig, img string, rootDir string, label string, fs string, ...) error
- func Hook(config *v1.Config, hook string, strict bool, cloudInitPaths ...string) error
- func PowerAction(cfg *v1.RunConfig) error
- func Raw2Azure(source string, fs v1.FS, logger v1.Logger, keepOldImage bool) error
- func Raw2Gce(source string, fs v1.FS, logger v1.Logger, keepOldImage bool) error
- type BuildISOAction
- type BuildISOActionOption
- type InstallAction
- type LiveBootloader
- type ResetAction
- type UpgradeAction
Constants ¶
const ( MB = int64(1024 * 1024) GB = 1024 * MB )
Variables ¶
This section is empty.
Functions ¶
func BuildDiskRun ¶
func BuildDiskRun(cfg *v1.BuildConfig, spec *v1.RawDiskArchEntry, imgType string, oemLabel string, recoveryLabel string, output string) error
func ChrootHook ¶
func ChrootHook(config *v1.Config, hook string, strict bool, chrootDir string, bindMounts map[string]string, cloudInitPaths ...string) (err error)
ChrootHook executes Hook inside a chroot environment
func CreateFinalImage ¶
func CreateFinalImage(c *v1.BuildConfig, img string, parts ...string) error
CreateFinalImage creates the final image by truncating the image with the proper sizes, concatenating the contents of the given parts and creating the partition table on the image
func CreatePart ¶
func CreatePart(c *v1.BuildConfig, img string, rootDir string, label string, fs string, size int64) error
CreatePart creates, truncates, and formats an img.part file. if rootDir is passed it will use that as the rootdir for the part creation, thus copying the contents into the newly created part file
func Hook ¶
Hook is RunStage wrapper that only adds logic to ignore errors in case v1.RunConfig.Strict is set to false
func PowerAction ¶ added in v0.1.2
PowerAction executes a power-action (Reboot/PowerOff) after completed install or upgrade and returns any encountered error.
Types ¶
type BuildISOAction ¶
type BuildISOAction struct {
// contains filtered or unexported fields
}
func NewBuildISOAction ¶
func NewBuildISOAction(cfg *v1.BuildConfig, spec *v1.LiveISO, opts ...BuildISOActionOption) *BuildISOAction
func (*BuildISOAction) ISORun ¶
func (b *BuildISOAction) ISORun() (err error)
BuildISORun will install the system from a given configuration
type BuildISOActionOption ¶
type BuildISOActionOption func(a *BuildISOAction)
func WithLiveBoot ¶
func WithLiveBoot(l LiveBootloader) BuildISOActionOption
type InstallAction ¶
type InstallAction struct {
// contains filtered or unexported fields
}
func NewInstallAction ¶
func NewInstallAction(cfg *v1.RunConfig, spec *v1.InstallSpec) *InstallAction
func (InstallAction) Run ¶
func (i InstallAction) Run() (err error)
InstallRun will install the system from a given configuration
type LiveBootloader ¶
type ResetAction ¶
type ResetAction struct {
// contains filtered or unexported fields
}
func NewResetAction ¶
func NewResetAction(cfg *v1.RunConfig, spec *v1.ResetSpec) *ResetAction
func (ResetAction) Run ¶
func (r ResetAction) Run() (err error)
ResetRun will reset the cos system to by following several steps
type UpgradeAction ¶
type UpgradeAction struct {
// contains filtered or unexported fields
}
UpgradeAction represents the struct that will run the upgrade from start to finish
func NewUpgradeAction ¶
func NewUpgradeAction(config *v1.RunConfig, spec *v1.UpgradeSpec) *UpgradeAction
func (UpgradeAction) Debug ¶
func (u UpgradeAction) Debug(s string, args ...interface{})
func (UpgradeAction) Error ¶
func (u UpgradeAction) Error(s string, args ...interface{})
func (UpgradeAction) Info ¶
func (u UpgradeAction) Info(s string, args ...interface{})
func (*UpgradeAction) Run ¶
func (u *UpgradeAction) Run() (err error)