Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultManager = "systemd"
DefaultManager if not empty is the default service-manager to use when missing
View Source
var ErrNotInstalled = errors.New("no candidate installed")
ErrNotInstalled is raised when the candidate service manager is not installed on the host system (use command-line -dry-run to avoid execution errors and just check your buildfile syntax)
View Source
var ErrUnknownAction = errors.New("unknown action")
ErrUnknownAction is raised when an unknown action is called (enable, start, ...)
View Source
var ErrUnknownManager = errors.New("unknown service manager")
ErrUnknownManager is raised when the asked manager does not exist
Functions ¶
This section is empty.
Types ¶
type ServiceManager ¶
type ServiceManager interface { // SetExecContext sets the execution context, default is os/exec SetExecutor(exec.Executor) // Name of executable (to check if installed and for debug) Name() string // Exec a specific action on a service Exec(action, service string) error }
ServiceManager is the common interface for service managers (systemd, init.d)
Click to show internal directories.
Click to hide internal directories.