mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-26 22:25:52 -05:00
Linter: make linter happy
This commit is contained in:
parent
14e49885fb
commit
e3bcc88880
8
app.go
8
app.go
@ -631,21 +631,21 @@ func (h *Headscale) Serve() error {
|
|||||||
|
|
||||||
promRouter := h.createPrometheusRouter()
|
promRouter := h.createPrometheusRouter()
|
||||||
|
|
||||||
promHttpServer := &http.Server{
|
promHTTPServer := &http.Server{
|
||||||
Addr: h.cfg.MetricsAddr,
|
Addr: h.cfg.MetricsAddr,
|
||||||
Handler: promRouter,
|
Handler: promRouter,
|
||||||
ReadTimeout: HTTPReadTimeout,
|
ReadTimeout: HTTPReadTimeout,
|
||||||
WriteTimeout: 0,
|
WriteTimeout: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
var promHttpListener net.Listener
|
var promHTTPListener net.Listener
|
||||||
promHttpListener, err = net.Listen("tcp", h.cfg.MetricsAddr)
|
promHTTPListener, err = net.Listen("tcp", h.cfg.MetricsAddr)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to bind to TCP address: %w", err)
|
return fmt.Errorf("failed to bind to TCP address: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
errorGroup.Go(func() error { return promHttpServer.Serve(promHttpListener) })
|
errorGroup.Go(func() error { return promHTTPServer.Serve(promHTTPListener) })
|
||||||
|
|
||||||
log.Info().
|
log.Info().
|
||||||
Msgf("listening and serving metrics on: %s", h.cfg.MetricsAddr)
|
Msgf("listening and serving metrics on: %s", h.cfg.MetricsAddr)
|
||||||
|
Loading…
Reference in New Issue
Block a user