signals

package
v0.0.0-...-34ebdd2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle() chan struct{}

Handle is like HandleWithInterrupt but it doesn't take a finalizer and will exit immediately after the first signal is received.

func HandleWithInterrupt

func HandleWithInterrupt(finalizer func()) chan struct{}

HandleWithInterrupt starts a goroutine which listens for SIGTERM, SIGINT, and SIGKILL and explicitly ignores SIGPIPE. It calls the finalizer function when the first signal is received and forcibly terminates the program after the second. If a nil function is provided, the program will exit after the first signal.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL