Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCleanupTimeout = 10 * time.Minute
Functions ¶
This section is empty.
Types ¶
type Cleanup ¶
type Cleanup struct {
// contains filtered or unexported fields
}
Cleanup is a type that can be used to run deferred cleanup logic with error handling. If the timeout is not set, it will default to 10 minutes. Cleanup logic uses the background context to ensure it runs even if the original context was canceled. Usage: defer cleanup.To(func() error { return nil }).WithErrMessage("some message").WithOriginalErr(&err).Done()
func (*Cleanup) WithErrMessage ¶
func (*Cleanup) WithOriginalErr ¶
Click to show internal directories.
Click to hide internal directories.