-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype.go
executable file
·50 lines (44 loc) · 1.08 KB
/
type.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
package main
import (
"sync"
)
type DataReport struct {
sync.Mutex
Infos []MetricReport `json:"infos"`
}
type MetricReport struct {
Title string `json:"title"`
Alias string `json:"alias"`
Issue []string `json:"issue"`
}
type ConfigInfo struct {
General struct {
Prometheus string `json:"prometheus"`
} `json:"general"`
Metrics map[string]MetricInfo `json:"metrics"`
}
type MetricInfo struct {
Name string `json:"name"`
Interval int `json:"interval"`
Alias string `json:"alias"`
Project string `json:"project"`
Label string `json:"label"`
Threshold int `json:"threshold"`
}
type Resp_PrometheusMetrics struct {
Status string `json:"status"`
Data struct {
Result []struct {
Metric struct {
Instance string `json:"instance"`
Node string `json:"node"`
Namespace string `json:"namespace"`
Pod string `json:"pod"`
Upstream string `json:"upstream"`
Server string `json:"server"`
} `json:"metric"`
Value []interface{} `json:"value"`
Values []interface{} `json:"values"`
} `json:"result"`
} `json:"data"`
}