-
Notifications
You must be signed in to change notification settings - Fork 1
/
dashboard_params.go
137 lines (115 loc) · 4.18 KB
/
dashboard_params.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
package modzy
import (
"time"
"github.com/modzy/sdk-go/model"
)
type AlertType string
const (
AlertTypeJobStuck AlertType = "JOB_STUCK"
AlertTypeModelExpiration AlertType = "MODEL_EXPIRATION"
)
// GetAlertsInput -
type GetAlertsInput struct{}
type AlertSummary struct {
Type AlertType `json:"type"`
Count int `json:"count"`
}
// GetAlertsOutput -
type GetAlertsOutput struct {
Alerts []AlertSummary `json:"alerts"`
}
// GetAlertDetailsInput -
type GetAlertDetailsInput struct {
Type AlertType `json:"type"`
}
// GetAlertDetailsOutput -
type GetAlertDetailsOutput struct {
Type AlertType `json:"type"`
Entities []string `json:"entities"`
}
// GetDataProcessedInput -
// The default and minimum accepted time between BtartDate and EndDate is 7 days.
// If only one date is provided the API matches it with a 7 day range.
type GetDataProcessedInput struct {
BeginDate model.ModzyDate
EndDate model.ModzyDate
UserIdentifier string
AccessKeyPrefix string
ModelIdentifier string
TeamIdentifier string
}
type GetDataProcessedOutput struct {
Summary model.DataProcessedSummary `json:"dataProcessed"`
Recent []model.DataProcessingRecent `json:"recent"`
}
// GetPredictionsMadeInput -
// The default and minimum accepted time between BtartDate and EndDate is 7 days.
// If only one date is provided the API matches it with a 7 day range.
type GetPredictionsMadeInput struct {
BeginDate model.ModzyDate
EndDate model.ModzyDate
UserIdentifier string
AccessKeyPrefix string
ModelIdentifier string
TeamIdentifier string
}
type GetPredictionsMadeOutput struct {
Summary model.PredictionsMadeSummary `json:"predictionsMade"`
Recent []model.PredictionsMadeRecent `json:"recent"`
}
type GetActiveUsersInput struct {
BeginDate model.ModzyDate
EndDate model.ModzyDate
UserIdentifier string
AccessKeyPrefix string
ModelIdentifier string
TeamIdentifier string
}
type GetActiveUsersOutput struct {
Users []model.ActiveUserSummary `json:"users"`
}
type GetActiveModelsInput struct {
BeginDate model.ModzyDate
EndDate model.ModzyDate
UserIdentifier string
AccessKeyPrefix string
ModelIdentifier string
TeamIdentifier string
}
type GetActiveModelsOutput struct {
Models []model.ActiveModelSummary `json:"models"`
}
type PrometheusMetricType string
const (
// PrometheusMetricTypeCPURequest - The number of cores requested by a container
PrometheusMetricTypeCPURequest PrometheusMetricType = "cpu-requested"
// PrometheusMetricTypeCPUAvailable - The cluster’s total number of available CPU cores.
PrometheusMetricTypeCPUAvailable PrometheusMetricType = "cpu-available"
// PrometheusMetricTypeCPUUsed - The total amount of “system” time + the total amount of “user” time
PrometheusMetricTypeCPUUsed PrometheusMetricType = "cpu-used"
// PrometheusMetricTypeMemoryRequested - The number of memory bytes requested by a container
PrometheusMetricTypeMemoryRequested PrometheusMetricType = "memory-requested"
// PrometheusMetricTypeMemoryAvailable - A node’s total allocatable memory bytes
PrometheusMetricTypeMemoryAvailable PrometheusMetricType = "memory-available"
// PrometheusMetricTypeMemoryUsed - The current memory usage in bytes, it includes all memory regardless of when it was accessed
PrometheusMetricTypeMemoryUsed PrometheusMetricType = "memory-used"
// PrometheusMetricTypeCPUOverallUsage - cpu-used / cpu-available
PrometheusMetricTypeCPUOverallUsage PrometheusMetricType = "cpu-overall-usage"
// PrometheusMetricTypeMemoryOverallUsage - memory-used / memory-available
PrometheusMetricTypeMemoryOverallUsage PrometheusMetricType = "memory-overall-usage"
// PrometheusMetricTypeCPUCurrentUsage - cpu-requested / cpu-available
PrometheusMetricTypeCPUCurrentUsage PrometheusMetricType = "cpu-current-usage"
)
// GetPrometheusMetricInput - The default and minimum accepted time between startDate and endDate is 7 days.
type GetPrometheusMetricInput struct {
BeginDate model.ModzyDate
EndDate model.ModzyDate
Metric PrometheusMetricType
}
type PrometheusValue struct {
Time time.Time `json:"time"`
Value string `json:"value"`
}
type GetPrometheusMetricOutput struct {
Values []PrometheusValue `json:"values"`
}