shutdown

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(h Hook)

Types

type CloseFunc

type CloseFunc func()

type Hook

type Hook interface {
	// WithSignals add more signals into hook
	WithSignals(signals ...syscall.Signal) Hook

	// Close register shutdown handles
	Close(funcs ...CloseFunc)

	CloseManual()
}

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

func Default

func Default() Hook

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