Documentation ¶
Index ¶
- func GetAppPath() (string, error)
- func InServiceMode() bool
- func InstallService(appPath, name, desc string, params ...string) error
- func InstallServiceWithOption(appPath, name string, params ServiceParamsOption, option ...ServiceOption) error
- func IsAnInteractiveSession() bool
- func QueryService(name string) (status string, err error)
- func RemoveService(name string) error
- func RunAsService(name string, start, stop func(), isDebug bool) (err error)
- func StartService(name string) error
- func StopService(name string) error
- type ServiceOption
- func AutoDelayStart() ServiceOption
- func AutoStart() ServiceOption
- func Dependencies(serviceName ...string) ServiceOption
- func Description(description string) ServiceOption
- func DisabledStart() ServiceOption
- func DisplayName(displayName string) ServiceOption
- func OnBootStart() ServiceOption
- func OnDemandStart() ServiceOption
- func OnSystemStart() ServiceOption
- type ServiceParamsOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAppPath ¶
func InServiceMode ¶
func InServiceMode() bool
func InstallService ¶
func InstallServiceWithOption ¶
func InstallServiceWithOption(appPath, name string, params ServiceParamsOption, option ...ServiceOption) error
func IsAnInteractiveSession ¶
func IsAnInteractiveSession() bool
func QueryService ¶
func RemoveService ¶
func RunAsService ¶
func StartService ¶
func StopService ¶
Types ¶
type ServiceOption ¶
func AutoDelayStart ¶
func AutoDelayStart() ServiceOption
func AutoStart ¶
func AutoStart() ServiceOption
func Dependencies ¶
func Dependencies(serviceName ...string) ServiceOption
func Description ¶
func Description(description string) ServiceOption
func DisabledStart ¶
func DisabledStart() ServiceOption
func DisplayName ¶
func DisplayName(displayName string) ServiceOption
func OnBootStart ¶
func OnBootStart() ServiceOption
func OnDemandStart ¶
func OnDemandStart() ServiceOption
func OnSystemStart ¶
func OnSystemStart() ServiceOption
type ServiceParamsOption ¶
func ServiceInstallParams ¶
func ServiceInstallParams(param ...string) ServiceParamsOption
Click to show internal directories.
Click to hide internal directories.