(m map[string]interface{})
| 1110 | } |
| 1111 | |
| 1112 | func convertTaskConfigMapToInternalTaskConfig(m map[string]interface{}) (internalConfig common.DtleTaskConfig, err error) { |
| 1113 | bs, err := json.Marshal(m) |
| 1114 | if nil != err { |
| 1115 | return common.DtleTaskConfig{}, fmt.Errorf("marshal config map failed: %v", err) |
| 1116 | } |
| 1117 | if err = json.Unmarshal(bs, &internalConfig); nil != err { |
| 1118 | return common.DtleTaskConfig{}, fmt.Errorf("unmarshal config map failed: %v", err) |
| 1119 | } |
| 1120 | return internalConfig, nil |
| 1121 | } |
| 1122 | |
| 1123 | func buildJobDetailResp(nomadJob nomadApi.Job, nomadAllocations []nomadApi.Allocation) (destTaskDetail models.MysqlDestTaskDetail, srcTaskDetail models.SrcTaskDetail, err error) { |
| 1124 | taskGroupToNomadAlloc := make(map[string][]nomadApi.Allocation) |
no test coverage detected