func IsRunning() bool
IsRunning returns true if the process is running
func IsTerminating() bool
IsTerminating returns true when the process is in termination mode after invoking Stop
func OnSIGHUP(callback func())
OnSIGHUP Registers a callback function on SIGHUP signal
func OnSIGUSR1(callback func())
OnSIGUSR1 Registers a callback function on USR1 signal
func OnSIGUSR2(callback func())
OnSIGUSR2 Registers a callback function on USR2 signal
func OnStart(task func())
OnStart Registers a callback on process start to be executed BEFORE the process is ready
func OnTerminate(task func(func(error)))
OnTerminate Registers a callback on process stop to be executed BEFORE the process termination
func Start()
Start Starts the process
func Stop()
Stop Stops the process with exit code 0
func StopWithError(err error)
StopWithError Stops the process with an error and exit code 1