# README
interrupt
Handle shutdowns cleanly and enable hot reload
Based on the shutdown handling code in btcwallet.
As such the ISC license applies to this code.
# Functions
AddHandler adds a handler to call when a SIGINT (Ctrl+C) is received.
GoroutineDump returns a string with the current goroutine dump in order to show what's going on in case of timeout.
Listener listens for interrupt signals, registers interrupt callbacks, and responds to custom shutdown signals as required.
Request programmatically requests a shutdown.
Requested returns true if an interrupt has been requested.
RequestRestart sets the reset flag and requests a restart.
# Variables
HandlersDone is closed after all interrupt handlers run the first time an interrupt is signaled.
Restart should be set to true prior to signalling the ShutdownRequestChan.
ShutdownRequestChan is a channel that can receive shutdown requests.
# Structs
HandlerWithSource is a callback and its origin source code location bundled.