Add rest-api for starting/stoping jobs

This commit is contained in:
Lou Knauer
2021-11-26 10:34:29 +01:00
parent 4ef6d47830
commit 8e5e278ea4
4 changed files with 241 additions and 11 deletions

View File

@@ -52,6 +52,13 @@ type MetricSeries struct {
Data []Float `json:"data"`
}
type JobMetaStatistics struct {
Unit string `json:"unit"`
Avg float64 `json:"avg"`
Min float64 `json:"min"`
Max float64 `json:"max"`
}
// Format of `meta.json` files.
type JobMeta struct {
JobId string `json:"job_id"`
@@ -67,10 +74,5 @@ type JobMeta struct {
Name string `json:"name"`
Type string `json:"type"`
} `json:"tags"`
Statistics map[string]struct {
Unit string `json:"unit"`
Avg float64 `json:"avg"`
Min float64 `json:"min"`
Max float64 `json:"max"`
} `json:"statistics"`
Statistics map[string]*JobMetaStatistics `json:"statistics"`
}