Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Err = errors.New("shutdown")
Use to signal that an operation can't be executed because the system is shutting down
Functions ¶
func Done ¶
func Done() <-chan struct{}
returns a channel that will close when the shutdown has completed
func Started5Sec ¶
func Started5Sec() <-chan struct{}
return a closed channel 5 seconds after the shutdown has started
func WaitForSignal ¶
func WaitForSignal(c ctx.C, cf ctx.CancelFunc)
setup signals and wait for the shutdown to complete
Types ¶
type ReleaseFn ¶
type ReleaseFn func()
func HoldAndWait ¶
func HoldAndWait() ReleaseFn
prevents the shutdown to complete until released, and also wait for the shutdown to start
Click to show internal directories.
Click to hide internal directories.