Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wait ¶
Wait sits and waits for interruption signals
The signals to listen for must be provided by the caller. Wait will always return true through the bool channel when it has caught a signal.
Example:
chanVar := signals.Wait(loggerFunc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt, os.Kill) SetupStuff() // setting up a webserver, or w/e <-chanVar // Wait for true to be returned because a signal was caught TearDownStuff() // cleanup after catching a signal then exit.
Types ¶
Click to show internal directories.
Click to hide internal directories.