os

package
v1.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithSignal

func WithSignal(ctx context.Context, fn func(ctx context.Context) error, signals ...os.Signal) error

WithSignal executes fn within a context that is canceled when one of specified signals is received from the OS. It's useful for wrapping some functions that should be canceled when the program receives e.g. SIGINT or SIGTERM.

Types

This section is empty.

Jump to

Keyboard shortcuts

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