Documentation
¶
Index ¶
- func ChrootHook(config *config.Config, hook string, chrootDir string, ...) (err error)
- func Hook(config *config.Config, hook string) error
- func ListBootEntries(cfg *config.Config) error
- func RenderTemplate(path string, config *config.Config, runtime state.Runtime) ([]byte, error)
- func SelectBootEntry(cfg *config.Config, entry string) error
- type InstallAction
- type ResetAction
- type UpgradeAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChrootHook ¶
func ChrootHook(config *config.Config, hook string, chrootDir string, bindMounts map[string]string) (err error)
ChrootHook executes Hook inside a chroot environment
func Hook ¶
Hook is RunStage wrapper that only adds logic to ignore errors in case v1.Config.Strict is set to false
func ListBootEntries ¶ added in v2.7.13
ListBootEntries lists the boot entries available in the system and prompts the user to select one then calls the underlying SelectBootEntry function to mange the entry writing and validation
func RenderTemplate ¶
func SelectBootEntry ¶ added in v2.7.13
SelectBootEntry sets the default boot entry to the selected entry This is the entrypoint for the bootentry action with --select flag also other actions can call this function to set the default boot entry
Types ¶
type InstallAction ¶
type InstallAction struct {
// contains filtered or unexported fields
}
func NewInstallAction ¶
func NewInstallAction(cfg *config.Config, spec *v1.InstallSpec) *InstallAction
func (InstallAction) Run ¶
func (i InstallAction) Run() (err error)
Run will install the system from a given configuration
type ResetAction ¶
type ResetAction struct {
// contains filtered or unexported fields
}
func NewResetAction ¶
func NewResetAction(cfg *agentConfig.Config, 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 *agentConfig.Config, 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)