Handler handles signals, can be interrupted. On SIGINT or SIGTERM it will exit, on SIGQUIT it will dump goroutine stacks to the Logger.
| 26 | // On SIGINT or SIGTERM it will exit, on SIGQUIT it |
| 27 | // will dump goroutine stacks to the Logger. |
| 28 | type Handler struct { |
| 29 | log log.Logger |
| 30 | receivers []SignalReceiver |
| 31 | quit chan struct{} |
| 32 | } |
| 33 | |
| 34 | // NewHandler makes a new Handler. |
| 35 | func NewHandler(log log.Logger, receivers ...SignalReceiver) *Handler { |
nothing calls this directly
no outgoing calls
no test coverage detected