forked from githubexporter/github-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
33 lines (27 loc) · 693 Bytes
/
main.go
File metadata and controls
33 lines (27 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
conf "github.com/infinityworks/github-exporter/config"
"github.com/infinityworks/github-exporter/exporter"
"github.com/infinityworks/github-exporter/http"
"github.com/infinityworks/go-common/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.Info("Starting Exporter")
exp := exporter.Exporter{
APIMetrics: mets,
Config: applicationCfg,
}
http.NewServer(exp).Start()
}