Browse Source

Merge branch 'master' into feature_gxh

pull/21/head
Sydonian 2 years ago
parent
commit
596fbfb127
2 changed files with 14 additions and 12 deletions
  1. +12
    -12
      api/pcm/pcm.go
  2. +2
    -0
      models/scheduler.go

+ 12
- 12
api/pcm/pcm.go View File

@@ -12,7 +12,7 @@ import (
const CORRECT_CODE int = 200

type UploadImageReq struct {
NodeID int64 `json:"nodeID"`
SlwNodeID int64 `json:"slwNodeID"`
ImagePath string `json:"imagePath"`
}

@@ -52,7 +52,7 @@ func (c *Client) UploadImage(req UploadImageReq) (*UploadImageResp, error) {
}

type GetImageListReq struct {
NodeID int64 `json:"nodeID"`
SlwNodeID int64 `json:"slwNodeID"`
}

type GetImageListResp struct {
@@ -90,8 +90,8 @@ func (c *Client) GetImageList(req GetImageListReq) (*GetImageListResp, error) {
}

type DeleteImageReq struct {
NodeID int64 `json:"nodeID"`
PCMJobID int64 `json:"pcmJobID"`
SlwNodeID int64 `json:"slwNodeID"`
PCMJobID int64 `json:"pcmJobID"`
}

type DeleteImageResp struct {
@@ -129,10 +129,10 @@ func (c *Client) DeleteImage(req DeleteImageReq) (*DeleteImageResp, error) {
}

type ScheduleTaskReq struct {
NodeID int64 `json:"nodeID"`
Envs []map[string]string `json:"envs"`
ImageID int64 `json:"imageID"`
CMDLine string `json:"cmdLine"`
SlwNodeID int64 `json:"slwNodeID"`
Envs []map[string]string `json:"envs"`
ImageID int64 `json:"imageID"`
CMDLine string `json:"cmdLine"`
}

type ScheduleTaskResp struct {
@@ -171,8 +171,8 @@ func (c *Client) ScheduleTask(req ScheduleTaskReq) (*ScheduleTaskResp, error) {
}

type GetTaskStatusReq struct {
NodeID int64 `json:"nodeID"`
PCMJobID int64 `json:"pcmJobID"`
SlwNodeID int64 `json:"slwNodeID"`
PCMJobID int64 `json:"pcmJobID"`
}

type GetTaskStatusResp struct {
@@ -211,8 +211,8 @@ func (c *Client) GetTaskStatus(req GetTaskStatusReq) (*GetTaskStatusResp, error)
}

type DeleteTaskReq struct {
NodeID int64 `json:"nodeID"`
PCMJobID int64 `json:"pcmJobID"`
SlwNodeID int64 `json:"slwNodeID"`
PCMJobID int64 `json:"pcmJobID"`
}

type DeleteTaskResp struct {


+ 2
- 0
models/scheduler.go View File

@@ -108,6 +108,8 @@ type EnvVar struct {
Value string `json:"value"`
}

// CPU、GPU、NPU、MLU单位为:核
// Storage、Memory单位为:字节
type JobResourcesInfo struct {
CPU float64 `json:"cpu"`
GPU float64 `json:"gpu"`


Loading…
Cancel
Save