recovery

package
v0.0.0-...-bfad91c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL