errorsource

package
v0.184.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 4 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownstreamError added in v0.181.0

func DownstreamError(err error, override bool) error

DownstreamError will apply the source as downstream

func Middleware

func Middleware(plugin string) httpclient.Middleware

Middleware captures error source metric

func PluginError added in v0.181.0

func PluginError(err error, override bool) error

PluginError will apply the source as plugin

func SourceError added in v0.181.0

func SourceError(source backend.ErrorSource, err error, override bool) error

SourceError returns an error with the source If source is already defined, it will return it, or you can override

Types

type Error

type Error struct {
	Source backend.ErrorSource

	Err error
}

Error captures error source and implements the error interface

func (Error) Error

func (r Error) Error() string

Error implements the interface

func (Error) Unwrap added in v0.181.0

func (r Error) Unwrap() error

Unwrap implements the interface

Jump to

Keyboard shortcuts

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