Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
Close quietly invokes the closer. Any errors or panics will be logged by the package logger.
func CloseFunc ¶
func CloseFunc(close func())
CloseFunc quietly invokes the given function. Any panics will be logged by the package logger.
func CloseFuncE ¶
func CloseFuncE(close func() error)
CloseFuncE quietly invokes the given function. Any errors or panics will be logged by the package logger.
func CloseWithTimeout ¶
CloseWithTimeout provides a closer for graceful service shutdown. Any errors or panics will be logged by the package logger.
Types ¶
type Closer ¶
type Closer struct {
// contains filtered or unexported fields
}
Closer for when you need to coordinate delayed cleanup.
func (*Closer) AddFunc ¶
func (c *Closer) AddFunc(close func())
AddFunc adds a cleanup function to be invoked by CloseAll.
func (*Closer) AddShutdown ¶ added in v0.7.0
AddShutdown adds a shutdown function to be invoked by CloseAll.
Click to show internal directories.
Click to hide internal directories.