debug

package
v22.11.9 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoreError

func IgnoreError(err error)

IgnoreError logs an error that's considered not important by the caller

func IgnoreError2

func IgnoreError2(ctx context.Context, err error)

func InjectPlannedError

func InjectPlannedError(in error, calldepth ...int) (err error)

func InjectPlannedFail

func InjectPlannedFail(in fail.Error, calldepth ...int) fail.Error

func Profile

func Profile(what string) func()

Profile starts profiling based on the content of 'what' Must be called with defer: defer debug.Profile("cpu")

func SetupError added in v22.11.1

func SetupError(spec string) error

Types

type Tracer

type Tracer interface {
	WithStopwatch() Tracer
	EnteringMessage() string
	Entering() Tracer
	ExitingMessage() string
	Exiting() Tracer
	TraceMessage(msg ...interface{}) string
	Trace(msg ...interface{}) Tracer
	TraceAsError(msg ...interface{}) Tracer
	Stopwatch() temporal.Stopwatch
}

Tracer ...

func NewTracer

func NewTracer(thing interface{}, enable bool, msg ...interface{}) Tracer

NewTracer creates a new Tracer instance

func NewTracerFromCtx

func NewTracerFromCtx(ctx context.Context, enable bool, msg ...interface{}) Tracer

NewTracerFromCtx creates a new Tracer instance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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