forked from TrueCloudLab/frostfs-s3-gw
Move s3-gate files to cmd/gate
This commit is contained in:
parent
3c7682402e
commit
212e1a50b7
8 changed files with 0 additions and 0 deletions
15
cmd/gate/app-metrics.go
Normal file
15
cmd/gate/app-metrics.go
Normal 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())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue