Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContextCloser ¶
func NewContextCloser(cancel context.CancelFunc) io.Closer
NewContextCloser transforms context cancellation function to be used with finalizer.
Types ¶
type ContextCloser ¶
type ContextCloser struct {
// contains filtered or unexported fields
}
ContextCloser maps a context to io.Closer.
type Finalizer ¶
type Finalizer struct {
// contains filtered or unexported fields
}
Finalizer collects resources for convenient cleanup.
func (*Finalizer) AddFn ¶
func (r *Finalizer) AddFn(fs ...func())
AddFn one or more func() to the finalizer.
Click to show internal directories.
Click to hide internal directories.