termination

package
v1.0.318-efb127d Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTerminated = o11y.NewWarning("terminated")

ErrTerminated is used to indicate that the errgroup should cancel the context, but that the shutdown is due to an expected signal, not an unhandled error.

Functions

func Handle

func Handle(ctx context.Context, delay time.Duration) error

Handle is intended to be used with a x/sync/errgroup.WithContext group. When a signal is received signalHandler returns an error. When the errgroup receives the error it will cancel the context. All long running operations should terminate once the context is canceled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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