shutdown

package
v1.0.712 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Shutdown = sync.OnceFunc(func() {
	if len(shutdownHooks) == 0 {
		return
	}
	logger.Infof("Shutting down")
	for _, fn := range shutdownHooks {
		fn()
	}
	shutdownHooks = []func(){}
})

Functions

func AddHook

func AddHook(fn func())

func ShutdownAndExit

func ShutdownAndExit(code int, msg string)

func WaitForSignal

func WaitForSignal()

Types

This section is empty.

Jump to

Keyboard shortcuts

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