# README
Service
What
Robust cross platform
CREATE
/DELETE
/START
/STOP
/QUERY
system service for GoThis repo is a cross platform reference implementation of the SERVICE spec
References
How
go get github.com/codemodify/systemkit-service ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ func main() { mySrevice := service.NewServiceFromConfig(service.Config{ Name: "test-service", Description: "Test Service", Executable: "/bin/sleep", Args: []string{"40"}, WorkingDirectory: "/tmp", Restart: true, DelayBeforeRestart: 10, StdOut: service.LogConfig{ Disable: true, }, StdErr: service.LogConfig{ Disable: true, }, }) err := mySrevice.Install() if err != nil { fmt.Println(err.String()) } }
API Install()
Installs the service Uninstall()
Deletes the service Start()
Starts the service Stop()
Stops the service Info()
Queries the service ___ ___ NewServiceFromSERVICE()
Service from portable SERVICE
definitionNewServiceFromName()
Service by finding in the system using its name NewServiceFromPlatformTemplate()
Service from a platform dependent template
Support
![]() ![]() | ||
---|---|---|
systemd | ![]() | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
rc.d | ![]() | ![]() ![]() |
procd | ![]() | ![]() |
sysvinit | ![]() | ![]() |
launchd | ![]() | ![]() |
Service Control Manager | ![]() | ![]() |
cygserver | ![]() | |
OpenRC | ![]() | |
Shepherd | ![]() | |
Mudur | ![]() | |
init | ![]() | |
cinit | ![]() | |
runit | ![]() | |
minit | ![]() | |
Initng | ![]() | Berry Linux |
Android Init | ![]() | ![]() |
UpStart | ![]() | ![]() ![]() |
Service Management Facility | ![]() | ![]() ![]() |
# Packages
No description provided by the author
# Functions
NewServiceFromName -.
NewServiceFromPlatformTemplate -.
NewServiceFromSERVICE -.
# Variables
ErrServiceConfigError -.
ErrServiceDoesNotExist -.
ErrServiceUnsupportedRequest -.
# Interfaces
Controller - starts and stops a service.
Describer - gets info about a service.
Installer - installs and removes a service.
Service -.