Commit 944d6052 authored by duanjinfei's avatar duanjinfei

update container sign struct

parent 3af2afd5
...@@ -20,8 +20,8 @@ type DockerCmd struct { ...@@ -20,8 +20,8 @@ type DockerCmd struct {
type TaskReq struct { type TaskReq struct {
TaskId string `json:"task_id"` TaskId string `json:"task_id"`
TaskParam string `json:"task_param"` TaskParam []byte `json:"task_param"`
TaskResult string `json:"task_result"` TaskResult []byte `json:"task_result"`
} }
type TaskParam struct { type TaskParam struct {
......
...@@ -57,8 +57,8 @@ func NewDockerOp() *DockerOp { ...@@ -57,8 +57,8 @@ func NewDockerOp() *DockerOp {
func (d *DockerOp) GetContainerSign(taskMsg *nodemanagerv1.PushTaskMessage, taskRes []byte) []byte { func (d *DockerOp) GetContainerSign(taskMsg *nodemanagerv1.PushTaskMessage, taskRes []byte) []byte {
reqBody := &models.TaskReq{ reqBody := &models.TaskReq{
TaskId: taskMsg.TaskId, TaskId: taskMsg.TaskId,
TaskParam: bytes.NewBuffer(taskMsg.TaskParam).String(), TaskParam: taskMsg.TaskParam,
TaskResult: bytes.NewBuffer(taskRes).String(), TaskResult: taskRes,
} }
body, err := json.Marshal(reqBody) body, err := json.Marshal(reqBody)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment