graceful

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachNotifier

func AttachNotifier(g Graceful, log logger)

AttachNotifier connects Graceful to notification of OS signals.

Types

type Graceful

type Graceful interface {
	Go(func(context.Context) error)
	Wait(context.Context) error
	Cancel()
}

Graceful interface

func New

func New(ctx context.Context) Graceful

New returns a new Graceful and an associated Context derived from ctx.

Jump to

Keyboard shortcuts

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