Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
func WithAddress ¶
func WithIdleTimeout ¶
func WithReadTimeout ¶
func WithWriteTimeout ¶
type ProfileProfiler ¶
type ProfileProfiler struct {
// contains filtered or unexported fields
}
"Profile"是指性能分析数据,"Profiler"是指生成和处理这些数据的工具
func New ¶
func New(opts ...Option) *ProfileProfiler
func (*ProfileProfiler) Serve ¶
func (pp *ProfileProfiler) Serve() error
创建mux自定义处理函数,避免与pprof的默认http.DefaultServeMux冲突 mux := http.NewServeMux() mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {}) http.ListenAndServe("ip:port", mux)
Click to show internal directories.
Click to hide internal directories.