Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultTerminateSignals default signals to handle // if not signals are provided // NOTE: we use the default st here instead of ALL signals // to avoid dying on signals like SIGCHLD and others that // are not intend to terminate the process DefaultTerminateSignals = []os.Signal{ syscall.SIGTERM, syscall.SIGHUP, syscall.SIGINT, syscall.SIGQUIT, } )
Functions ¶
func OnDone ¶
OnDone registers a callback on a context when it's done The ctx.Err() is passed as is to the callback function
func WithSignal ¶
WithSignal return a context that is canceld if any of the specified signals was received
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.