Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterruptListener ¶
func InterruptListener() <-chan struct{}
InterruptListener listens for OS Signals such as SIGINT (Ctrl+C) and shutdown requests from shutdownRequestChannel. It returns a channel that is closed when either signal is received.
func InterruptRequested ¶
func InterruptRequested(interrupted <-chan struct{}) bool
InterruptRequested returns true when the channel returned by interruptListener was closed. This simplifies early shutdown slightly since the caller can just use an if statement instead of a select.
func RequestShutdown ¶
func RequestShutdown()
RequestShutdown sends a request to shutdown the instance.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.