prysm-pulse/shared/prometheus/simple_server.go
Preston Van Loon 5eb5f6afa9
Faucet enhancements + cluster private key management system (#1679)
* second pass at faucet, no rate limiting yet

* Add authentication support, step 1. This stuff needs to be refactored and tested

* move deposit input to keystore pkg, add proof of possession and withdrawal addr

* checkpoint on progress with cluster private key manager

* checkpoint w/ bootnode config

* checkpoint

* resolve todo

* encrypt the secrets

* add note about querying testnet

* workspace

* checkpoitn

* remove limits

* update

* checkpoint

* checkpoint

* remove jwt stuff

* fix build

* lint

* lint

* remove init

* remove jwt

* update

* checkpoint
2019-03-07 11:14:57 -05:00

21 lines
415 B
Go

package prometheus
import (
"net/http"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
// RunSimpleServerOrDie is a blocking call to serve /metrics at the given
// address.
func RunSimpleServerOrDie(addr string) {
mux := http.NewServeMux()
mux.Handle("/metrics", promhttp.Handler())
svr := &http.Server{Addr: addr, Handler: mux}
if err := svr.ListenAndServe(); err != nil {
panic(err)
}
}