Compare commits

...

2 Commits

Author SHA1 Message Date
tx7do
ce77bd094d feat: rest pprof. 2024-11-19 17:29:27 +08:00
tx7do
6f251c9fb7 feat: refactor tls utils. 2024-11-19 13:56:22 +08:00
3 changed files with 16 additions and 15 deletions

View File

@@ -23,10 +23,10 @@ require (
github.com/olekukonko/tablewriter v0.0.5
github.com/spf13/cobra v1.8.1
github.com/tx7do/kratos-bootstrap/api v0.0.8
github.com/tx7do/kratos-bootstrap/config v0.0.7
github.com/tx7do/kratos-bootstrap/logger v0.0.7
github.com/tx7do/kratos-bootstrap/registry v0.0.7
github.com/tx7do/kratos-bootstrap/tracer v0.0.5
github.com/tx7do/kratos-bootstrap/config v0.0.8
github.com/tx7do/kratos-bootstrap/logger v0.0.8
github.com/tx7do/kratos-bootstrap/registry v0.0.8
github.com/tx7do/kratos-bootstrap/tracer v0.0.8
github.com/tx7do/kratos-bootstrap/utils v0.1.2
golang.org/x/tools v0.27.0
)

View File

@@ -104,15 +104,16 @@ func initRestConfig(cfg *conf.Bootstrap, mds ...middleware.Middleware) []kratosR
func registerHttpPprof(s *kratosRest.Server) {
s.HandleFunc("/debug/pprof", pprof.Index)
s.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
s.HandleFunc("/debug/pprof/profile", pprof.Profile)
s.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
s.HandleFunc("/debug/pprof/trace", pprof.Trace)
s.HandleFunc("/debug/pprof/allocs", pprof.Handler("allocs").ServeHTTP)
s.HandleFunc("/debug/pprof/block", pprof.Handler("block").ServeHTTP)
s.HandleFunc("/debug/pprof/goroutine", pprof.Handler("goroutine").ServeHTTP)
s.HandleFunc("/debug/pprof/heap", pprof.Handler("heap").ServeHTTP)
s.HandleFunc("/debug/pprof/mutex", pprof.Handler("mutex").ServeHTTP)
s.HandleFunc("/debug/pprof/threadcreate", pprof.Handler("threadcreate").ServeHTTP)
s.HandleFunc("/debug/cmdline", pprof.Cmdline)
s.HandleFunc("/debug/profile", pprof.Profile)
s.HandleFunc("/debug/symbol", pprof.Symbol)
s.HandleFunc("/debug/trace", pprof.Trace)
s.HandleFunc("/debug/allocs", pprof.Handler("allocs").ServeHTTP)
s.HandleFunc("/debug/block", pprof.Handler("block").ServeHTTP)
s.HandleFunc("/debug/goroutine", pprof.Handler("goroutine").ServeHTTP)
s.HandleFunc("/debug/heap", pprof.Handler("heap").ServeHTTP)
s.HandleFunc("/debug/mutex", pprof.Handler("mutex").ServeHTTP)
s.HandleFunc("/debug/threadcreate", pprof.Handler("threadcreate").ServeHTTP)
}

View File

@@ -7,7 +7,7 @@ git tag oss/minio/v0.0.8 --force
git tag registry/v0.0.8 --force
git tag config/v0.0.8 --force
git tag logger/v0.0.8 --force
git tag rpc/v0.0.8 --force
git tag rpc/v0.0.9 --force
git tag tracer/v0.0.8 --force
git tag database/ent/v0.0.8 --force