|
|
@@ -26,6 +26,10 @@ const ( |
|
|
MemoryUtilization = "MemoryUtilization" |
|
|
MemoryUtilization = "MemoryUtilization" |
|
|
GPUUtilization = "GPUUtilization" |
|
|
GPUUtilization = "GPUUtilization" |
|
|
CPUUtilization = "CPUUtilization" |
|
|
CPUUtilization = "CPUUtilization" |
|
|
|
|
|
|
|
|
|
|
|
MethodPost = "POST" |
|
|
|
|
|
MethodGet = "GET" |
|
|
|
|
|
CodeSuccess = 200 |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
type JobID string |
|
|
type JobID string |
|
|
@@ -72,6 +76,7 @@ var JobInfoTypeUnion = types.NewTypeUnion[JobInfo]( |
|
|
(*PCMInferenceJobInfo)(nil), |
|
|
(*PCMInferenceJobInfo)(nil), |
|
|
(*CompleteJobInfo)(nil), |
|
|
(*CompleteJobInfo)(nil), |
|
|
(*StartJobInfo)(nil), |
|
|
(*StartJobInfo)(nil), |
|
|
|
|
|
(*NotifyJobInfo)(nil), |
|
|
) |
|
|
) |
|
|
var _ = serder.UseTypeUnionInternallyTagged(&JobInfoTypeUnion, "type") |
|
|
var _ = serder.UseTypeUnionInternallyTagged(&JobInfoTypeUnion, "type") |
|
|
|
|
|
|
|
|
@@ -162,6 +167,16 @@ type StartJobInfo struct { |
|
|
Type string `json:"type"` |
|
|
Type string `json:"type"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type NotifyJobInfo struct { |
|
|
|
|
|
serder.Metadata `union:"Notify"` |
|
|
|
|
|
JobInfoBase |
|
|
|
|
|
Type string `json:"type"` |
|
|
|
|
|
RequestType string `json:"requestType"` |
|
|
|
|
|
Url string `json:"url"` |
|
|
|
|
|
Body any `json:"body"` |
|
|
|
|
|
Headers map[string]string `json:"headers"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
type ResourceChoice struct { |
|
|
type ResourceChoice struct { |
|
|
Type string `json:"type"` |
|
|
Type string `json:"type"` |
|
|
ResourceScopes []ResourceScope `json:"resourceScopes"` |
|
|
ResourceScopes []ResourceScope `json:"resourceScopes"` |
|
|
|