package
0.0.24
Repository: https://github.com/p9c/util.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AddHandler adds a handler to call when a SIGINT (Ctrl+C) is received.
Receiver listens for interrupt signals, registers interrupt callbacks, and responds to custom shutdown signals as required.
Request programatically requests a shutdown.
Requested returns true if an interrupt has been requested.
RequestRestart sets the reset flag and requests a restart.

# Variables

AddHandlerChan is used to add an interrupt handler to the list of handlers to be invoked on SIGINT (Ctrl+C) signals.
Chan is used to receive SIGINT (Ctrl+C) signals.
HandlersDone is closed after all interrupt handlers run the first time an interrupt is signaled.
= true.
ShutdownRequestChan is a channel that can receive shutdown requests.
Signals is the list of signals that cause the interrupt.