Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunWithFatalLogging ¶
RunWithFatalLogging wraps a callback, logging errors and panics it returns. Useful as a "catch all" for applications so that they can log fatal events, perhaps before exiting.
func RunWithRecoveryLogging ¶ added in v1.3.5
RunWithRecoveryLogging wraps a callback, logging any panics recovered as errors. Useful as a "catch all" for applications so that they can log fatal events, perhaps before exiting.
func RunWithRecoveryLoggingWithError ¶ added in v1.9.0
func RunWithRecoveryLoggingWithError(ctx context.Context, runFn func(ctx context.Context) error) (retErr error)
RunWithRecoveryLoggingWithError is identical to RunWithFatalLogging however it only emits logs on panics, not if runFn a normal error This can be useful if you want to special case the logging of this error but still want a centralized place to handle panics
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.