diff --git a/api/internal/types/types.go b/api/internal/types/types.go index ce180789..a0c697dd 100644 --- a/api/internal/types/types.go +++ b/api/internal/types/types.go @@ -82,6 +82,26 @@ type Region struct { RunningJobs int64 `json:"runningJobs"` } +type GeneralTaskReq struct { + Name string `json:"name"` + ComputeType string `json:"computeType"` + TemplateId string `json:"templateId"` + AdapterId string `json:"adapterId"` + ClusterIds []string `json:"clusterIds"` + Strategy Strategy `json:"strategy"` + ReqBody []string `json:"reqBody"` +} + +type Strategy struct { + Name string `json:"name"` + StaticWeightList []StaticWeightList `json:"staticWeightList"` +} + +type StaticWeightList struct { + ClusterName string `json:"clusterName"` + Weight int `json:"weight"` +} + type DeleteTaskReq struct { Id int64 `path:"id"` } @@ -1116,9 +1136,9 @@ type HpcResourceReq struct { } type HpcResourceResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data HPCResource `json:"data"` + Code int32 `json:"code"` + Msg string `json:"msg"` + HPCResource HPCResource `json:"hpcResource"` } type HPCResource struct {