Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*App)
func WithShutdownCallbacks ¶
func WithShutdownCallbacks(callbacks ...ShutdownCallback) Option
WithShutdownCallbacks 通过此处设置shutdown回调
type ShutdownCallback ¶
ShutdownCallback 采用 context.Context 来控制超时,而不是用 time.After 是因为 - 超时本质上是使用这个回调的人控制的 - 我们还希望用户知道,他的回调必须要在一定时间内处理完毕,而且他必须显式处理超时错误
Click to show internal directories.
Click to hide internal directories.