Daniel Theophanes c880387dea service: break out each linux service into its own file.
Breaking apart each service reduces the overall number of branches
in the code, but increases duplication. Duplication can be taken
care of in follow-up commits while still keeping the clarity of
linear code.

Also expiriment with code that would allow the user to add or remove
systems. Still expirimental and not exposed in the API.
2015-03-08 17:29:10 -07:00
2015-01-18 17:48:14 -08:00
2015-01-13 21:54:35 -08:00
2015-01-13 09:41:14 -08:00
2015-01-18 17:09:07 -08:00
2015-01-13 21:54:35 -08:00
2015-02-28 13:21:31 +01:00

service (BETA)

service will install / un-install, start / stop, and run a program as a service (daemon). Currently supports Windows XP+, Linux/(systemd | Upstart | SysV), and OSX/Launchd.

Windows controls services by setting up callbacks that is non-trivial. This is very different then other systems. This package provides the same API despite the substantial differences. It also can be used to detect how a program is called, from an interactive terminal or from a service manager.

TODO

Need to test the Interactive test for the following platforms:

  • SysV
  • systemd system and user service
  • Launchd system and user service

The following items need to be done:

  • Determine if systemd has a launchd equivalent user service.
  • Fix Interactive test for user services.
  • Document that windows doesn't have a user service.
  • Document that upstart's user service definition changes over versions. Do not support.
  • For Linux platforms and Launchd add:
    • UserName
    • Arguments
    • WorkingDirectory
    • ChRoot
  • Determine the best way to document the Config.Option values per platform.
    • Should some of the current parameters like "ChRoot" and "WorkingDirectory" move to "Option" map?
S
Description
Run go programs as a service on major platforms.
Readme 3.8 MiB
Languages
Go 98.4%
Makefile 1%
Shell 0.3%
Dockerfile 0.3%