Documentation
¶
Index ¶
Constants ¶
View Source
const ( // The OS ID of Azure Linux. OSIDAzureLinux = "azurelinux" // The OS ID of Fedora. OSIDFedora = "fedora" )
Variables ¶
View Source
var ErrMissingExecutable = errors.New("executable missing, no auto-resolution")
ErrMissingExecutable is returned when a required executable cannot be found or acquired.
Functions ¶
func RequireExecutable ¶
func RequireExecutable(ctx opctx.Ctx, programName string, prereq *PackagePrereq) error
Checks that the executable identified by `programName` is available in the host system. If it can't be found but `prereq` is provided, then will attempt to auto-install the prerequisite, dependent on the policy configured in `ctx`. If `programName` isn't present and can't be auto-installed, returns an error.
Types ¶
type PackagePrereq ¶
type PackagePrereq struct {
// List of Azure Linux distro packages that must be installed to provide this prerequisite.
AzureLinuxPackages []string
// List of Fedora distro packages that must be installed to provide this prerequisite.
FedoraPackages []string
}
Represents a prerequisite resource that must be present in the host; can provide information on how to acquire that resource if not ready.
Click to show internal directories.
Click to hide internal directories.