new filterRanges query and Cluster.filterRanges field

This commit is contained in:
Lou Knauer
2021-05-06 08:36:24 +02:00
parent 5c0ada7ec9
commit b6df8e88b9
5 changed files with 734 additions and 293 deletions

View File

@@ -9,14 +9,10 @@ import (
"time"
)
type AddJobInput struct {
JobID string `json:"jobId"`
UserID string `json:"userId"`
ProjectID string `json:"projectId"`
ClusterID string `json:"clusterId"`
StartTime time.Time `json:"startTime"`
Duration int `json:"duration"`
NumNodes int `json:"numNodes"`
type FilterRanges struct {
Duration *IntRangeOutput `json:"duration"`
NumNodes *IntRangeOutput `json:"numNodes"`
StartTime *TimeRangeOutput `json:"startTime"`
}
type FloatRange struct {
@@ -34,6 +30,11 @@ type IntRange struct {
To int `json:"to"`
}
type IntRangeOutput struct {
From int `json:"from"`
To int `json:"to"`
}
type JobFilter struct {
Tags []string `json:"tags"`
JobID *StringInput `json:"jobId"`
@@ -110,19 +111,6 @@ type PageRequest struct {
Page *int `json:"page"`
}
type StartJobInput struct {
JobID string `json:"jobId"`
UserID string `json:"userId"`
ProjectID string `json:"projectId"`
ClusterID string `json:"clusterId"`
StartTime time.Time `json:"startTime"`
NumNodes int `json:"numNodes"`
}
type StopJobInput struct {
StopTime time.Time `json:"stopTime"`
}
type StringInput struct {
Eq *string `json:"eq"`
Contains *string `json:"contains"`
@@ -135,6 +123,11 @@ type TimeRange struct {
To time.Time `json:"to"`
}
type TimeRangeOutput struct {
From time.Time `json:"from"`
To time.Time `json:"to"`
}
type JobMetricScope string
const (