clouderror

package
v0.80.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(err error, s *status.Status) error

Wrap masks the gRPC status of the provided error by replacing it with the provided status.

func WrapCaller

func WrapCaller(err error, s *status.Status, caller Caller) error

WrapCaller masks the gRPC status of the provided error by replacing it with the provided status. The call site of the error is captured from the provided caller.

func WrapTransient

func WrapTransient(err error, msg string) error

WrapTransient masks the gRPC status of the provided error by replacing the status message. If the original error has transient (retryable) gRPC status code, the status code is forwarded. Otherwise, the status code is masked with INTERNAL.

func WrapTransientCaller

func WrapTransientCaller(err error, msg string, caller Caller) error

WrapTransient masks the gRPC status of the provided error by replacing the status message. If the original error has transient (retryable) gRPC status code, the status code is forwarded. Otherwise, the status code is masked with INTERNAL. The call site of the error is captured from the provided caller.

Types

type Caller

type Caller struct {
	// contains filtered or unexported fields
}

Caller is the caller info for an error.

func NewCaller

func NewCaller(pc uintptr, file string, line int, ok bool) Caller

NewCaller creates a new caller.

Jump to

Keyboard shortcuts

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