|
|
|
@@ -58,8 +58,8 @@ func (c *Client) GetClusterInfo(req GetClusterInfoReq) ([]ClusterDetail, error) |
|
|
|
} |
|
|
|
|
|
|
|
type CreateJobReq struct { |
|
|
|
//Name string `json:"name"` |
|
|
|
//Description string `json:"description"` |
|
|
|
Name string `json:"name"` |
|
|
|
Description string `json:"description"` |
|
|
|
JobResources schsdk.JobResources `json:"jobResources"` |
|
|
|
DataDistribute DataDistribute `json:"dataDistributes"` |
|
|
|
} |
|
|
|
@@ -120,11 +120,11 @@ func (c *Client) CreateJob(req CreateJobReq) (*CreateJobResp, error) { |
|
|
|
} |
|
|
|
|
|
|
|
// 将req转换成json,并打印 |
|
|
|
req2, err := serder.ObjectToJSONEx(req) |
|
|
|
if err != nil { |
|
|
|
return nil, fmt.Errorf("request to json: %w", err) |
|
|
|
} |
|
|
|
fmt.Println(string(req2)) |
|
|
|
//req2, err := serder.ObjectToJSONEx(req) |
|
|
|
//if err != nil { |
|
|
|
// return nil, fmt.Errorf("request to json: %w", err) |
|
|
|
//} |
|
|
|
//fmt.Println(string(req2)) |
|
|
|
|
|
|
|
resp, err := http2.PostJSON(targetUrl, http2.RequestParam{ |
|
|
|
Body: req, |
|
|
|
|