Initial support for generating Thermos data objects.
This commit is contained in:
parent
51597ecb32
commit
afcdaa84b8
2 changed files with 115 additions and 0 deletions
49
thermos.go
Normal file
49
thermos.go
Normal file
|
@ -0,0 +1,49 @@
|
|||
/**
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package realis
|
||||
|
||||
|
||||
type ThermosExecutor struct {
|
||||
Task ThermosTask `json:"task""`
|
||||
}
|
||||
|
||||
type ThermosTask struct {
|
||||
Processes []ThermosProcess `json:"processes"`
|
||||
Constraints []ThermosConstraint `json:"constraints"`
|
||||
Resources ThermosResources `json:"resources"`
|
||||
}
|
||||
|
||||
type ThermosConstraint struct {
|
||||
Order []string `json:"order"`
|
||||
}
|
||||
|
||||
type ThermosResources struct {
|
||||
CPU float64 `json:"cpu"`
|
||||
Disk int `json:"disk"`
|
||||
RAM int `json:"ram"`
|
||||
GPU int `json:"gpu"`
|
||||
}
|
||||
|
||||
type ThermosProcess struct {
|
||||
Daemon bool `json:"daemon"`
|
||||
Name string `json:"name"`
|
||||
Ephemeral bool `json:"ephemeral"`
|
||||
MaxFailures int `json:"max_failures"`
|
||||
MinDuration int `json:"min_duration"`
|
||||
Cmdline string `json:"cmdline"`
|
||||
Final bool `json:"final`
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue