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 添加要监听的系统信号
WithSignals(signals ...syscall.Signal) Hook
Close(funcs ...func())
}
Hook a graceful shutdown hook, default with signals of SIGINT and SIGTERM Hook 定义了一个优雅关闭的钩子接口,默认监听 SIGINT 和 SIGTERM 信号 可通过 WithSignals 添加其他信号,并通过 Close 注册关闭时的处理函数
Click to show internal directories.
Click to hide internal directories.