Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisablePanic ¶
func DisablePanic() option
DisablePanic is a option to disabling panic when exit from run function.
func Interactive ¶
func Interactive() bool
Interactive returns false if running under the OS service manager and true otherwise.
func Run ¶
func Run(r runFunc, opts ...option)
Run initializes new windows service and runs command action. runFunc provides a place to initiate the service. runFunc function always has blocked and exit from it, means that service will be stopped correctly if is context was canceled. runFunc should not call os.Exit directly in the function, it is not correctly service stop. Context canceled it is mean that signal of stop got and need to stop run function.
func TimeoutStop ¶
TimeoutStop is a option to specify timeout of stopping service. After expired timeout, process of service will be terminated. If is not set option, value will be equal default value 20s.
Types ¶
This section is empty.