Move promhttp above manet.Listen
This commit is contained in:
parent
6df2cf552a
commit
cff1fcfe9d
@ -46,13 +46,13 @@ func serveRPC(a api.FullNode, stop node.StopFunc, addr multiaddr.Multiaddr) erro
|
|||||||
|
|
||||||
http.Handle("/rest/v0/import", importAH)
|
http.Handle("/rest/v0/import", importAH)
|
||||||
|
|
||||||
|
http.Handle("/metrics", promhttp.Handler())
|
||||||
|
|
||||||
lst, err := manet.Listen(addr)
|
lst, err := manet.Listen(addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("could not listen: %w", err)
|
return xerrors.Errorf("could not listen: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
http.Handle("/metrics", promhttp.Handler())
|
|
||||||
|
|
||||||
srv := &http.Server{Handler: http.DefaultServeMux}
|
srv := &http.Server{Handler: http.DefaultServeMux}
|
||||||
|
|
||||||
sigChan := make(chan os.Signal, 2)
|
sigChan := make(chan os.Signal, 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user