shutdown

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wait

func Wait(ctx context.Context, cancel context.CancelFunc, termFn TerminationFn, logger logger) error

Wait allows the service to wait for a termination signal, start the cancellation process by calling the context.CancelFunc in order to perform a graceful service shutdown executing the TerminationFn in input.

Types

type TerminationFn

type TerminationFn func(context.Context) error

TerminationFn is a callback invoked on context cancellation.

Jump to

Keyboard shortcuts

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