Documentation
¶
Overview ¶
Package startup 管理服务启动前的初始化钩子及其清理工作。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
type Hook struct {
// Name 是钩子的稳定唯一名称。
Name string
// Start 在传输服务启动前执行。
Start func(context.Context) error
// Stop 在应用清理阶段执行。
Stop func(context.Context) error
}
Hook 描述一项需要在服务启动前初始化并在退出时清理的工作。
Click to show internal directories.
Click to hide internal directories.