Documentation ¶
Overview ¶
Package pprof provides pprof handler options for httpserver module.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithProfiling ¶
func WithProfiling() httpserver.Opt
WithProfiling replaces servers handler with http.DefaultServeMux which is instrumented with profiling endpoints by net/http/pprof. This option is meant be used with stand alone profiling server, not embedded inside application server. For serving profiling endpoints inside your application web server see https://pkg.go.dev/net/http/pprof.
Example ¶
package main import ( "github.com/elisasre/go-common/service/module/httpserver" "github.com/elisasre/go-common/service/module/httpserver/pprof" ) func main() { httpserver.New( httpserver.WithAddr(":6062"), pprof.WithProfiling(), ) }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.