diff options
| author | Paul Bütow <pbuetow@mimecast.com> | 2020-01-20 18:41:05 +0000 |
|---|---|---|
| committer | Paul Bütow <pbuetow@mimecast.com> | 2020-01-21 14:35:23 +0000 |
| commit | c128865c4c7411c29a59fca9a3a2f95537686d7b (patch) | |
| tree | 193bccc70d942c8b70cc93fae2670263701e43aa /internal/pprof | |
| parent | 3755a9911ecb05886577095f2b8cc8b9e4066a3a (diff) | |
Move commands to cmd/ and move internal dependencies to internal/
Diffstat (limited to 'internal/pprof')
| -rw-r--r-- | internal/pprof/pprof.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/pprof/pprof.go b/internal/pprof/pprof.go new file mode 100644 index 0000000..f78bcf6 --- /dev/null +++ b/internal/pprof/pprof.go @@ -0,0 +1,17 @@ +package pprof + +import ( + "fmt" + "net/http" + _ "net/http" + _ "net/http/pprof" + + "github.com/mimecast/dtail/internal/config" + "github.com/mimecast/dtail/internal/logger" +) + +func Start() { + bindAddr := fmt.Sprintf("%s:%d", config.Common.PProfBindAddress, config.Common.PProfPort) + logger.Info("Starting PProf server", bindAddr) + go http.ListenAndServe(bindAddr, nil) +} |
