Documentation
¶
Overview ¶
Package closer stores process-wide shutdown callbacks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
func Bind(c interface{ Close() error })
Bind registers the Close method of c as a shutdown callback.
func BindPriority ¶ added in v0.2.30
BindPriority registers the Close method of c with an explicit close phase.
func CloseAll ¶
func CloseAll()
CloseAll runs all registered shutdown callbacks in reverse registration order.
func Register ¶
func Register(f func() error)
Register adds f to the process shutdown callback list.
func RegisterPriority ¶ added in v0.2.30
RegisterPriority adds f to the shutdown callback list with an explicit close phase.
Types ¶
Click to show internal directories.
Click to hide internal directories.