extsignals

package
v1.8.22 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 8 Imported by: 20

Documentation

Index

Constants

View Source
const (
	OrderReadinessFalse    = 0   //Set Readiness to false
	OrderStopActions       = 10  //Stop all actions
	OrderStopCustom        = 20  //Custom handler
	OrderStopProbesHttp    = 80  //Shutdown the probes HTTP server
	OrderStopExtensionHttp = 90  //Shutdown the extension HTTP server
	OrderTermination       = 100 //Fallback handler for SIGINT and SIGTERM, the extension usually stops after shutting down the server. This is a last resort if there is an issue with the server shutdown.
)

Variables

This section is empty.

Functions

func ActivateSignalHandlers

func ActivateSignalHandlers()

func AddSignalHandler

func AddSignalHandler(signalHandler SignalHandler)

func RemoveSignalHandlersByName added in v1.8.21

func RemoveSignalHandlersByName(names ...string)

RemoveSignalHandlersByName removes signal handlers by name. This is mainly used for testing.

Types

type ByOrder

type ByOrder []SignalHandler

func (ByOrder) Len

func (a ByOrder) Len() int

func (ByOrder) Less

func (a ByOrder) Less(i, j int) bool

func (ByOrder) Swap

func (a ByOrder) Swap(i, j int)

type SignalHandler

type SignalHandler struct {
	Handler func(signal os.Signal)
	Order   int
	Name    string
}

Jump to

Keyboard shortcuts

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