package
0.0.0-20240516065436-a2bc238b4b59
Repository: https://github.com/tools-go/go-utils.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

GetRealIPFromContext get the remote endpoint from request, if not found, return an empty string.
GetTraceFromContext get the Trace var from the context, if there is no such a trace utility, return nil.
GetTraceFromRequest get the Trace var from the req context, if there is no such a trace utility, return nil.
No description provided by the author
HandleCrash xx.
HandleFunc wrap a trace handle func outer the original http handle func.
LogCrashStack for stack.
New will create a Trace using a name, identifying the trace process.
copy this from glog.
WithID will create a Trace with a name and a trace id.
WithParent will create a Trace use a parent Trace and a identified name.
WithTraceForContext will return a new context wrapped a trace handler around the original ctx.
WithTraceForContext2 will return a new context wrapped a trace handler around the original ctx.
WithTraceForContext will return a new context wrapped a trace handler around the original ctx.

# Constants

No description provided by the author

# Interfaces

Trace is a log trace utils wrapped on glog, can be used to trace a http request and its subrequests.