mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-02 23:03:57 +08:00
22 lines
276 B
Go
22 lines
276 B
Go
package service
|
|
|
|
import (
|
|
"net/http"
|
|
_ "net/http/pprof"
|
|
)
|
|
|
|
type pprofSvc struct {
|
|
}
|
|
|
|
func (p *pprofSvc) Name() string {
|
|
return "Pprof Server"
|
|
}
|
|
|
|
func (p *pprofSvc) Start() error {
|
|
return http.ListenAndServe(":6060", nil)
|
|
}
|
|
|
|
func (p *pprofSvc) Stop() error {
|
|
return nil
|
|
}
|