Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogFatalHandler func(format string, v ...interface{}) = func(format string, v ...interface{}) { log.Fatalf(format, v...) }
LogFatalHandler can be overridden if needed
Functions ¶
func CatchInterruptSignal ¶
func CatchInterruptSignal(handler func())
CatchInterruptSignal listens for external interrupt signals, if happens, runs a handler
func HandlePanic ¶
HandlePanic recovers from panic and prints the message
func IfErrorThenExit ¶
func IfErrorThenExit(err error, message string, logHandlers ...func(format string, v ...interface{}))
IfErrorThenExit checks if error is not nil, prints message and exit
func Periodic ¶
Periodic runs handler in a frequency defined by the parameters. Returns cancel function
func StartSameTime ¶
func StartSameTime(runners ...func())
StartSameTime runs provided runners at the same time (or as close as possible)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.