runctx

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotifySignals = []os.Signal{syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT} //nolint:gochecknoglobals // This is only useful in main packages.

NotifySignals specifies signals that would cause the context to be canceled.

Functions

func Run

func Run(fn func(ctx context.Context) error) error

Types

type Funcs

type Funcs []func(ctx context.Context) error

Funcs is a list of functions that can be executed in parallel.

func (Funcs) Run

func (f Funcs) Run() error

Run executes all funcs in parallel, and returns the first error. Function context is canceled when the process receives a signal from NotifySignals.

Jump to

Keyboard shortcuts

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