svcapp

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyInstalled = errors.New("service is already installed")
View Source
var ErrAlreadyRunning = errors.New("service is already ranning")
View Source
var ErrAlreadyStopped = errors.New("service had already been stopped")
View Source
var ErrInsufficientPrivileges = errors.New("insufficient privileges")
View Source
var ErrInvalidSystemResponse = errors.New("invalid system response")
View Source
var ErrNotInstalled = errors.New("service is not installed")
View Source
var ErrUnsupportedSystem = errors.New("unsupported system")
View Source
var OnSigterm func(signal os.Signal)

OnSigterm is a callback envoked when the application that runs a service needs to stop

Functions

func Install

func Install(params InstallParams) error

func MonitorSigterm

func MonitorSigterm() chan bool

MonitorSigterm creates a sigterm channel for stopping a service

func Run

func Run(name string) error

func Start

func Start(name string) error

func Status

func Status(name string) (string, error)

func Stop

func Stop(name string) error

func Uninstall

func Uninstall(name string) error

Types

type InstallParams

type InstallParams struct {
	Name        string
	Executable  string // path to service executable
	Args        string
	DispName    string
	Description string
}

InstallParams is used when installing a new service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL