crash

package
v0.0.0-...-eb3ab3a Latest Latest
Warning

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

Go to latest
Published: May 1, 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