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 quiety invokes the given function with the timeout set on its context. 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(closer func())
AddFunc adds a closer function to be invoked by CloseAll.
See also CloseFunc.
func (*Closer) AddFuncE ¶
AddFuncE adds a closer function to be invoked by CloseAll.
See also CloseFuncE.
func (*Closer) AddTimeout ¶
AddTimeout adds a closer function with a timeout to be invoked by CloseAll.
See also CloseWithTimeout.