Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ExitSignals are used to determine if an incoming os.Signal should cause termination. ExitSignals = map[os.Signal]bool{ syscall.SIGHUP: true, syscall.SIGINT: true, syscall.SIGABRT: true, syscall.SIGILL: true, syscall.SIGQUIT: true, syscall.SIGTERM: true, syscall.SIGSEGV: true, syscall.SIGTSTP: true, } // ExitChannel is for gracefully terminating the LogSignals() function. ExitChannel = make(chan bool, 1) // SignalChannel is for listening to OS signals. SignalChannel = make(chan os.Signal, 1) // Debug is defined globally for mocking logrus.Debug statements. Debug func(args ...interface{}) = logrus.Debug )
Functions ¶
func LogSignal ¶
LogSignal prints a logging statements for the given signal, exiting only when observing an exit signal.
func LogSignals ¶
func LogSignals()
LogSignals continuously prints logging statements for each signal it observes, exiting only when observing an exit signal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.