From 8ea6d19eb4fb1030dc2d3b2ea2a58585574b8d00 Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Fri, 19 Apr 2024 16:54:52 +0800 Subject: [PATCH] merge Former-commit-id: 7a02b3ac98c0e725bf0ea601112067dc9903e36c --- api/internal/types/types.go | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) 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 {