Documentation
¶
Overview ¶
Package environ implements utilities for managing host environment during an operation
Index ¶
- func CleanupOperationState(printer utils.Printer, logger log.FieldLogger) error
- func ConfigureStateDirectory(stateDir, devicePath string) (err error)
- func DisableAgentServices(logger log.FieldLogger) error
- func UninstallAgentServices(printer utils.Printer, logger log.FieldLogger) error
- func UninstallPackageServices(printer utils.Printer, logger log.FieldLogger) error
- func UninstallService(service string) error
- func UninstallSystem(ctx context.Context, printer utils.Printer, logger log.FieldLogger) (err error)
- func ValidateInstall(baseDir, serviceName string, env *localenv.LocalEnvironment) func() error
- func ValidateNoPackageState(packages pack.PackageService, stateDir string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupOperationState ¶
func CleanupOperationState(printer utils.Printer, logger log.FieldLogger) error
CleanupOperationState removes all operation state after the operation is complete
func ConfigureStateDirectory ¶
ConfigureStateDirectory sets up the state directory stateDir on host. Optional devicePath specifies the device dedicated for state. If the device has been specified, it will be formatted and mounted as the state directory.
func DisableAgentServices ¶
func DisableAgentServices(logger log.FieldLogger) error
DisableAgentServices disables agent services (installer agent and/or service) without stopping
func UninstallAgentServices ¶
func UninstallAgentServices(printer utils.Printer, logger log.FieldLogger) error
UninstallAgentServices stops and uninstalls system agent services
func UninstallPackageServices ¶
func UninstallPackageServices(printer utils.Printer, logger log.FieldLogger) error
UninstallPackageServices stops and uninstalls system package services
func UninstallService ¶
UninstallService stops and uninstalls a service with the specified name
func UninstallSystem ¶
func UninstallSystem(ctx context.Context, printer utils.Printer, logger log.FieldLogger) (err error)
UninstallSystem removes all state from the system on best-effort basis
func ValidateInstall ¶
func ValidateInstall(baseDir, serviceName string, env *localenv.LocalEnvironment) func() error
ValidateInstall performs a local environment sanity check to make sure that install on this node can proceed without issues
func ValidateNoPackageState ¶
func ValidateNoPackageState(packages pack.PackageService, stateDir string) error
ValidateNoPackageState checks whether the specified package service has state (i.e. has packages) and returns an error in this case.
Types ¶
This section is empty.