Flags for listen and metrics address; fix in newRedirectPasteSuccess.txt.tmpl
Fixes #9
This commit is contained in:
@@ -13,11 +13,7 @@ import (
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
const (
|
||||
METRICS_ADDR = "127.0.0.1:58614"
|
||||
)
|
||||
|
||||
func StartMetricsServer() {
|
||||
func StartMetricsServer(addr string) {
|
||||
var (
|
||||
_ = promauto.NewGaugeFunc(prometheus.GaugeOpts{
|
||||
Namespace: "rushlink",
|
||||
@@ -45,7 +41,7 @@ func StartMetricsServer() {
|
||||
router.Handle("/metrics", promhttp.Handler()).Methods("GET")
|
||||
srv := &http.Server{
|
||||
Handler: router,
|
||||
Addr: METRICS_ADDR,
|
||||
Addr: addr,
|
||||
WriteTimeout: 15 * time.Second,
|
||||
ReadTimeout: 15 * time.Second,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user