obserr

package
v0.0.0-...-3611cfd Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Original

func Original(e error) error

Types

type Error

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

Error should be used as a drop-in replacement for Golang's native error type where adding key/value data or annotated info would provide useful context making debugging easier.

This should be used in conjunction with go/src/obs/flight_recorder.go's Vals type where the actual telemetry/reporting happens.

func Annotate

func Annotate(e error, an interface{}) *Error

func New

func New(e interface{}) *Error

func (*Error) Annotate

func (e *Error) Annotate(ann interface{}) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Get

func (e *Error) Get(k string) interface{}

func (*Error) Set

func (e *Error) Set(kvs ...interface{}) *Error

func (*Error) Vals

func (e *Error) Vals() map[string]interface{}

Jump to

Keyboard shortcuts

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