Documentation
¶
Overview ¶
Package recovery contains types and methods to aid in recovering from panics in goroutines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecoverableRoutine ¶
type RecoverableRoutine struct {
Routine func(context.Context, any)
RoutineArg any
UsageLogger usagemetrics.Logger
ErrorCode int
ExpectedMinDuration time.Duration
Backoff backoff.BackOff
// contains filtered or unexported fields
}
RecoverableRoutine is a set of details about a goroutine, its arguments and how to handle its recovery.
func (*RecoverableRoutine) StartRoutine ¶
func (r *RecoverableRoutine) StartRoutine(ctx context.Context)
StartRoutine starts a routine and retries if it panics, following the assigned backoff policy.
Click to show internal directories.
Click to hide internal directories.