Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GracefulShutdown ¶
func GracefulShutdown(wg *sync.WaitGroup, cancel context.CancelFunc)
GracefulShutdown supports to clean up goroutines after termination signal captured.
func StartAndGracefulShutdown ¶
StartAndGracefulShutdown starts to run the specified task in a goroutine and wait for termination signal to shutdown gracefully.
Note, this method is not suitable for any non-blocking task that release resources in defer way.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.