shutdown

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook interface {
	// WithSignals add more signals into hook
	WithSignals(signals ...syscall.Signal) Hook
	// Interrupt hook
	Interrupt()
	// Close register shutdown handles
	Close(funcs ...func())
}

Hook a graceful shutdown hook, default with signals of SIGINT and SIGTERM

func NewHook

func NewHook() Hook

NewHook create a Hook instance

Jump to

Keyboard shortcuts

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