debug

package
v21.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 16 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 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")

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(task concurrency.Task, enable bool, msg ...interface{}) Tracer

NewTracer 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