@@ -88,9 +88,9 @@ func (r *RootCmd) workspaceAgent() *clibase.Cmd {
88
88
ctx , stopNotify := signal .NotifyContext (ctx , InterruptSignals ... )
89
89
defer stopNotify ()
90
90
91
- // dumpHandler does signal handling, so we call it after the
91
+ // DumpHandler does signal handling, so we call it after the
92
92
// reaper.
93
- go dumpHandler (ctx )
93
+ go DumpHandler (ctx )
94
94
95
95
ljLogger := & lumberjack.Logger {
96
96
Filename : filepath .Join (logDir , "coder-agent.log" ),
@@ -119,7 +119,7 @@ func (r *RootCmd) workspaceAgent() *clibase.Cmd {
119
119
// Enable pprof handler
120
120
// This prevents the pprof import from being accidentally deleted.
121
121
_ = pprof .Handler
122
- pprofSrvClose := serveHandler (ctx , logger , nil , pprofAddress , "pprof" )
122
+ pprofSrvClose := ServeHandler (ctx , logger , nil , pprofAddress , "pprof" )
123
123
defer pprofSrvClose ()
124
124
// Do a best effort here. If this fails, it's not a big deal.
125
125
if port , err := urlPort (pprofAddress ); err == nil {
@@ -262,7 +262,7 @@ func (r *RootCmd) workspaceAgent() *clibase.Cmd {
262
262
return cmd
263
263
}
264
264
265
- func serveHandler (ctx context.Context , logger slog.Logger , handler http.Handler , addr , name string ) (closeFunc func ()) {
265
+ func ServeHandler (ctx context.Context , logger slog.Logger , handler http.Handler , addr , name string ) (closeFunc func ()) {
266
266
logger .Debug (ctx , "http server listening" , slog .F ("addr" , addr ), slog .F ("name" , name ))
267
267
268
268
// ReadHeaderTimeout is purposefully not enabled. It caused some issues with
0 commit comments