Documentation
¶
Index ¶
- func CheckError(ctx context.Context, err error)
- func IsTransientErr(ctx context.Context, err error) bool
- func IsTransientErrQuiet(ctx context.Context, err error) bool
- func NewErrTransient(s string) error
- func NewExitErr(exitCode int) error
- func NewExitErrWithCause(exitCode int, cause error) error
- type Exited
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
CheckError is a convenience function to fatally log an exit if the supplied error is non-nil
func IsTransientErr ¶
IsTransientErr reports whether the error is transient and logs it.
func IsTransientErrQuiet ¶
IsTransientErrQuiet reports whether the error is transient and logs only if it is.
func NewErrTransient ¶
func NewExitErr ¶
func NewExitErrWithCause ¶
NewExitErrWithCause returns an Exited error reporting exitCode while preserving cause's message and unwrap chain. Use it when the process must exit with a specific code yet still surface why; main() writes the cause as the container's termination message.
Types ¶
Click to show internal directories.
Click to hide internal directories.