-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathglobals.go
65 lines (59 loc) · 1.16 KB
/
globals.go
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package main
import (
"github.com/mtulio/statuscake-exporter/collector"
"github.com/mtulio/statuscake-exporter/stk"
"github.com/prometheus/client_golang/prometheus"
)
type globalConf struct {
listenAddress string
metricsPath string
version string
versionCm string
versionTag string
versionEnv string
StkUsername string
StkApikey string
StkTags string
StkInterval int
Resolution int
StkEnableTests bool
StkEnableSSL bool
StkSSLFlags string
}
type globalProm struct {
MC *collector.MasterCollector
Registry *prometheus.Registry
Gatherers *prometheus.Gatherers
}
const (
exporterName = "statuscake_exporter"
exporterDescription = "StatusCake Exporter"
defaultInterval = 300
defaultResolution = 30
)
var (
// VersionCommit is a compiler exporterd var
VersionCommit string
VersionTag string
VersionFull string
VersionEnv string
// Global vars
config = globalConf{
":9190",
"/metrics",
VersionFull,
VersionCommit,
VersionTag,
VersionEnv,
"",
"",
"",
defaultInterval,
defaultResolution,
false,
false,
"",
}
stkAPI *stk.StkAPI
prom globalProm
)