shutdown

package
v0.0.0-...-4f0ab6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 4 Imported by: 2

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳