代码拉取完成,页面将自动刷新
package main
import (
"github.com/fatih/structs"
conf "gitee.com/oscstudio/gitee-exporter/config"
"gitee.com/oscstudio/gitee-exporter/exporter"
"gitee.com/oscstudio/gitee-exporter/http"
"gitee.com/oscstudio/gitee-exporter/logger"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
)
var (
log *logrus.Logger
applicationCfg conf.Config
mets map[string]*prometheus.Desc
)
func init() {
applicationCfg = conf.Init()
mets = exporter.AddMetrics()
log = logger.Start(&applicationCfg)
}
func main() {
log.WithFields(structs.Map(applicationCfg)).Info("Starting Exporter")
exp := exporter.Exporter{
APIMetrics: mets,
Config: applicationCfg,
}
http.NewServer(exp).Start()
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。