signalKit

package
v3.0.924 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ExitSignals 会将程序退出的所有能捕捉的信号
	/*
		参考: go-zero 中的"core/proc/signals.go".
	*/
	ExitSignals = []os.Signal{syscall.SIGTERM, syscall.SIGINT}
)

Functions

func MonitorExitSignals

func MonitorExitSignals()

MonitorExitSignals 同步地监听.

@param callbacks 可以不传

PS: (1) 会 阻塞 调用此函数的goroutine; (2) 理论上,应该 由main goroutine调用此函数 && 此函数只能被调用1次.

Types

This section is empty.

Jump to

Keyboard shortcuts

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