termination

package
v1.0.11493-a082403 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package termination contains a simple handler for termination signals.

It is wired into system.System by default.

Index

Constants

This section is empty.

Variables

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

ErrTerminated is used to indicate that the Handle func received a shutdown signal.

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 Handle returns ErrTerminated. If the context is cancelled Handle will return with no error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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