zdebug

package
v0.0.0-...-aa698f8 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: BSD-3-Clause Imports: 20 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ProfilingURLPrefix = "debug/pprof/"
)

Variables

View Source
var (
	IsInTests                            = (strings.HasSuffix(os.Args[0], ".test"))
	GetOpenFileCountFunc                 func() int
	AverageCPUFunc                       func() float64
	GetOngoingProcsCountFunc             func() int
	TimersGoingCountFunc                 func() int
	MakeContextErrorForSignalRestartFunc func(pos int, invokeFunc string, parts ...any) error
	KeyValueSaveContextErrorFunc         func(key string, object any)
	KeyValueGetAndDeleteContextErrorFunc func(key string) (err error)

	AllProfileTypes = []string{"heap", "cpu", "block", "mutex"}

	HandleRestartFunc func(err error)
)
View Source
var AppURLPrefix func() string

Functions

func CallingFunctionInfo

func CallingFunctionInfo(pos int) (function, file string, line int)

func CallingFunctionShortInfo

func CallingFunctionShortInfo(pos int) (function, shortFunction, file, shortFile string, line int)

func CallingFunctionString

func CallingFunctionString(pos int) string

func CallingStackString

func CallingStackString() string

func CallingStackStringAt

func CallingStackStringAt(index int) string

func Consume

func Consume(p ...any)

func FileLineAndCallingFunctionString

func FileLineAndCallingFunctionString(pos int, useShortFile bool) string

func LoadStoredRestartContextError

func LoadStoredRestartContextError()

func PrintAllGoroutines

func PrintAllGoroutines()

func PrintMemoryStats

func PrintMemoryStats()

func RecoverFromPanic

func RecoverFromPanic(exit bool, invokeFunc string)

func SetProfilingHandler

func SetProfilingHandler(router *mux.Router)

func SetupSignalHandler

func SetupSignalHandler()

func StoreAndExitError

func StoreAndExitError(err error, exit bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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