The workload encapsulates what the user wants to run on top of the image. Everything else we do abstracts away the OS, the hardware, the environment, and what is left is what matters: the workload. For now only the `Custom` payload is implemented which requires the user to name the packages they want installed, the repositories to pull them from and what systemd services to enable. A few other stub workloads are added to show the idea, but these are not used. The ideal is for the workload to have only the minimal number of configuration options.
22 lines
435 B
Go
22 lines
435 B
Go
package workload
|
|
|
|
type Custom struct {
|
|
BaseWorkload
|
|
Packages []string
|
|
Services []string
|
|
DisabledServices []string
|
|
}
|
|
|
|
func (p *Custom) GetPackages() []string {
|
|
return p.Packages
|
|
}
|
|
|
|
func (p *Custom) GetServices() []string {
|
|
return p.Services
|
|
}
|
|
|
|
// TODO: Does this belong here? What kind of workload requires
|
|
// services to be disabled?
|
|
func (p *Custom) GetDisabledServices() []string {
|
|
return p.DisabledServices
|
|
}
|