First batch
This commit is contained in:
30
processing.go
Normal file
30
processing.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package oclib
|
||||
|
||||
type Processing struct {
|
||||
Resource
|
||||
Container string `json:"Container"` // We could create a specific class for container, that could check if the name exists/is available
|
||||
Repository string `json:"Repository"` // Indicate where to find the container image => Could add a struct handling authentication to the repo
|
||||
Command string `json:"Command"`
|
||||
Arguments []string `json:"Arguments"`
|
||||
Environment []map[string]string `json:"Environment"` // a key/value struct is what ressembles the most a NAME=VALUE struct
|
||||
|
||||
ExecutionRequirements ExecutionRequirementsModel `json:"ExecutionRequirements"`
|
||||
|
||||
Price uint `json:"Price"`
|
||||
License string `json:"License"`
|
||||
|
||||
}
|
||||
|
||||
type ExecutionRequirementsModel struct {
|
||||
CPUs uint `json:"cpus" required:"true"`
|
||||
GPUs uint `json:"gpus" description:"Amount of GPUs needed"`
|
||||
RAM uint `json:"ram" required:"true" description:"Units in MB"`
|
||||
|
||||
Parallel bool `json:"parallel"`
|
||||
ScalingModel uint `json:"scaling_model"`
|
||||
DiskIO string `json:"disk_io"`
|
||||
}
|
||||
|
||||
func (p *Processing) GetType() ResourceType{
|
||||
return PROCESSING
|
||||
}
|
||||
Reference in New Issue
Block a user