Skip to content

Commit

Permalink
Bump up rk-entry to latest one
Browse files Browse the repository at this point in the history
  • Loading branch information
dongxuny committed Dec 14, 2022
1 parent c98b8c0 commit c3cfd94
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 405 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- name: Setup golangci-lint
uses: golangci/[email protected]
- name: Run linter
Expand Down
22 changes: 11 additions & 11 deletions boot/mux_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (
"net"
"net/http"
"net/http/pprof"
"path/filepath"
"path"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -398,16 +398,16 @@ func (entry *MuxEntry) Bootstrap(ctx context.Context) {
})

entry.Router.NewRoute().Methods(http.MethodGet).Path(entry.PProfEntry.Path).HandlerFunc(pprof.Index)
entry.Router.NewRoute().Methods(http.MethodGet).Path(filepath.Join(entry.PProfEntry.Path, "cmdline")).HandlerFunc(pprof.Cmdline)
entry.Router.NewRoute().Methods(http.MethodGet).Path(filepath.Join(entry.PProfEntry.Path, "profile")).HandlerFunc(pprof.Profile)
entry.Router.NewRoute().Methods(http.MethodGet, http.MethodPost).Path(filepath.Join(entry.PProfEntry.Path, "symbol")).HandlerFunc(pprof.Symbol)
entry.Router.NewRoute().Methods(http.MethodGet).Path(filepath.Join(entry.PProfEntry.Path, "trace")).HandlerFunc(pprof.Trace)
entry.Router.NewRoute().Methods(http.MethodGet).Path(filepath.Join(entry.PProfEntry.Path, "allocs")).HandlerFunc(pprof.Handler("allocs").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(filepath.Join(entry.PProfEntry.Path, "block")).HandlerFunc(pprof.Handler("block").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(filepath.Join(entry.PProfEntry.Path, "goroutine")).HandlerFunc(pprof.Handler("goroutine").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(filepath.Join(entry.PProfEntry.Path, "heap")).HandlerFunc(pprof.Handler("heap").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(filepath.Join(entry.PProfEntry.Path, "mutex")).HandlerFunc(pprof.Handler("mutex").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(filepath.Join(entry.PProfEntry.Path, "threadcreate")).HandlerFunc(pprof.Handler("threadcreate").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(path.Join(entry.PProfEntry.Path, "cmdline")).HandlerFunc(pprof.Cmdline)
entry.Router.NewRoute().Methods(http.MethodGet).Path(path.Join(entry.PProfEntry.Path, "profile")).HandlerFunc(pprof.Profile)
entry.Router.NewRoute().Methods(http.MethodGet, http.MethodPost).Path(path.Join(entry.PProfEntry.Path, "symbol")).HandlerFunc(pprof.Symbol)
entry.Router.NewRoute().Methods(http.MethodGet).Path(path.Join(entry.PProfEntry.Path, "trace")).HandlerFunc(pprof.Trace)
entry.Router.NewRoute().Methods(http.MethodGet).Path(path.Join(entry.PProfEntry.Path, "allocs")).HandlerFunc(pprof.Handler("allocs").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(path.Join(entry.PProfEntry.Path, "block")).HandlerFunc(pprof.Handler("block").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(path.Join(entry.PProfEntry.Path, "goroutine")).HandlerFunc(pprof.Handler("goroutine").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(path.Join(entry.PProfEntry.Path, "heap")).HandlerFunc(pprof.Handler("heap").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(path.Join(entry.PProfEntry.Path, "mutex")).HandlerFunc(pprof.Handler("mutex").ServeHTTP)
entry.Router.NewRoute().Methods(http.MethodGet).Path(path.Join(entry.PProfEntry.Path, "threadcreate")).HandlerFunc(pprof.Handler("threadcreate").ServeHTTP)
entry.PProfEntry.Bootstrap(ctx)
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/rookie-ninja/rk-mux

go 1.17
go 1.18

require (
github.com/golang-jwt/jwt/v4 v4.4.2
github.com/gorilla/mux v1.8.0
github.com/prometheus/client_golang v1.13.0
github.com/rookie-ninja/rk-entry/v2 v2.2.11
github.com/rookie-ninja/rk-entry/v2 v2.2.13
github.com/rookie-ninja/rk-logger v1.2.12
github.com/rookie-ninja/rk-query v1.2.14
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a
Expand Down
Loading

0 comments on commit c3cfd94

Please sign in to comment.