wait

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextOrGroupOrInterrupt

func ContextOrGroupOrInterrupt(ctx context.Context, wg *sync.WaitGroup)

ContextOrGroupOrInterrupt blocks until one of 3 things happens: the context deadline is met (if one exists), the wait group's Wait() function naturally unblocks, or we receive a SIGINT/SIGTERM signal.

func InterruptSignal

func InterruptSignal() chan os.Signal

InterruptSignal creates a channel that will accept the next SIGTERM or SIGINT signal the OS sends to this process. This call does NOT block - it is up to you to "<-" in or out of a 'select' to actually control program flow.

Types

This section is empty.

Jump to

Keyboard shortcuts

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