Merge pull request 'metircs' (#76) from zhangweiii/pcm-coordinator:master into master
Former-commit-id: 02e65867d15ac76227716f5c92f379b3a09f342e
This commit is contained in:
commit
4cab08db5d
|
@ -1,16 +1,11 @@
|
|||
package core
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/core"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
|
||||
"gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func MetricsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := core.NewMetricsLogic(r.Context(), svcCtx)
|
||||
err := l.Metrics()
|
||||
result.HttpResult(r, w, nil, err)
|
||||
}
|
||||
return promhttp.Handler().ServeHTTP
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue