Move s3-gate files to cmd/gate

This commit is contained in:
Evgeniy Kulikov 2020-07-09 12:26:30 +03:00
parent 3c7682402e
commit 212e1a50b7
8 changed files with 0 additions and 0 deletions

15
cmd/gate/app-metrics.go Normal file
View file

@ -0,0 +1,15 @@
package main
import (
"github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/spf13/viper"
)
func attachMetrics(v *viper.Viper, r *mux.Router) {
if !v.GetBool(cfgEnableMetrics) {
return
}
r.Handle("/metrics", promhttp.Handler())
}