structured

package
v0.0.0-...-7635388 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	// MoreInfo is additional information about the error e.g. a link to context describing the context for the error.
	MoreInfo string
	// Impact is the likely impact of the error on system function e.g. "Proxies are unable to communicate with Istiod."
	Impact string
	// Action is the next step the user should take e.g. "Open an issue or bug report."
	Action string
	// LikelyCause is the likely cause for the error e.g. "Software bug."
	LikelyCause string
	// Err is the original error string.
	Err error
}

Error represents structured error information, for optional use in scope.X or log.X calls. It is not the same thing as structured logging. The "structured" here means adding a structure to user facing messages. See https://docs.google.com/document/d/1vdYswLQuYnrLA2fDjk6OoZx2flBABa18UjCGTn8gsg8/ for additional information.

func NewErr

func NewErr(serr *Error, err error) *Error

NewErr creates a new copy of an Error with the content of serr and err and returns a ptr to it.

func (*Error) Error

func (e *Error) Error() string

Error implements the error#Error interface.

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap implements error unwrapping for %w verb.

Jump to

Keyboard shortcuts

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