Documentation ¶
Overview ¶
Package daemon linux version
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedSystem appears if try to use service on system which is not supported by this release ErrUnsupportedSystem = errors.New("Unsupported system") // ErrRootPrivileges appears if run installation or deleting the service without root privileges ErrRootPrivileges = errors.New("You must have root user privileges. Possibly using 'sudo' command should help") // ErrAlreadyInstalled appears if service already installed on the system ErrAlreadyInstalled = errors.New("Service has already been installed") // ErrNotInstalled appears if try to delete service which was not been installed ErrNotInstalled = errors.New("Service is not installed") // ErrAlreadyRunning appears if try to start already running service ErrAlreadyRunning = errors.New("Service is already running") // ErrAlreadyStopped appears if try to stop already stopped service ErrAlreadyStopped = errors.New("Service has already been stopped") )
Functions ¶
Types ¶
type Daemon ¶
type Daemon interface { // Install the service into the system Install(exec_path string, args ...string) (string, error) // Remove the service and all corresponding files from the system Remove() (string, error) // Start the service Start() (string, error) // Stop the service Stop() (string, error) // Status - check the service status Status() (string, error) // Run - run executable service Run(e Executable) (string, error) }
Daemon interface has a standard set of methods/commands
type Executable ¶ added in v0.11.0
type Executable interface { // Start - non-blocking start service Start() // Stop - non-blocking stop service Stop() // Run - blocking run service Run() }
Executable interface defines controlling methods of executable service
Source Files ¶
Click to show internal directories.
Click to hide internal directories.