Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handle ¶
func Handle() chan struct{}
Handle is like HandleWithInterrupt but it doesn't take a finalizer and will exit immediately after the first signal is received.
func HandleWithInterrupt ¶
func HandleWithInterrupt(finalizer func()) chan struct{}
HandleWithInterrupt starts a goroutine which listens for SIGTERM, SIGINT, and SIGKILL and explicitly ignores SIGPIPE. It calls the finalizer function when the first signal is received and forcibly terminates the program after the second. If a nil function is provided, the program will exit after the first signal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.