crash

package
v0.0.0-...-880cb89 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recovery

func Recovery(ctx context.Context, r any, namespace string) error

Recovery provides a deferrable func that can be called to recover from, and log context about, crashes. If an error is returned, then a panic recovery occurred.

Call it as follows:

defer func() {
	if crErr := crash.Recovery(ctx, recover()); crErr != nil {
		err = crErr // err needs to be a named return variable
	}
}()

Types

This section is empty.

Jump to

Keyboard shortcuts

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