shutdown

package module
v0.0.0-...-937b104 Latest Latest
Warning

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

Go to latest
Published: May 6, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

README

shutdown

cancel a context when programs are interrupted

See GoDoc for API documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithShutdown

func WithShutdown(ctx context.Context) context.Context

WithShutdown returns an enriched version of the original Context which will be cancelled when the user wants to shut down the program by sending SIGINT or SIGTERM. If the user sends the signal again before the program has finished shutting down then it will exit immediately with exit status 1.

Types

This section is empty.

Jump to

Keyboard shortcuts

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