Documentation
¶
Index ¶
Constants ¶
View Source
const (
KeyExit = "signal"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HookManager ¶
type HookManager struct {
// contains filtered or unexported fields
}
func NewHookManager ¶
func NewHookManager() *HookManager
func (*HookManager) Done ¶
func (hm *HookManager) Done()
func (*HookManager) Register ¶
func (hm *HookManager) Register(fn HookFunc, opts ...Option)
Register 注册 Hook
func (*HookManager) SendExitSignal ¶
func (hm *HookManager) SendExitSignal()
type HookPriority ¶
type HookPriority int
HookPriority Hook 优先级排序
const ( HighPriority HookPriority = iota DefaultPriority LowPriority )
type Option ¶
type Option func(*hook)
Option 配置选项
func WithPriority ¶
func WithPriority(p HookPriority) Option
func WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.