25 lines
535 B
Go
25 lines
535 B
Go
package cron
|
|
|
|
import (
|
|
"encoding/json"
|
|
coreClient "gitlink.org.cn/JointCloud/pcm-coordinator/client"
|
|
"net/http"
|
|
"strings"
|
|
)
|
|
|
|
func PushResourceInfo() {
|
|
// push submitted mark to coordinator
|
|
PushReq := coreClient.PushResourceInfoReq{}
|
|
|
|
url := CoreUrl + "/pcm/v1/core/pushTaskInfo"
|
|
method := "POST"
|
|
|
|
jsonStr, _ := json.Marshal(PushReq)
|
|
payload := strings.NewReader(string(jsonStr))
|
|
client := &http.Client{}
|
|
req, _ := http.NewRequest(method, url, payload)
|
|
req.Header.Add("Content-Type", "application/json")
|
|
client.Do(req)
|
|
|
|
}
|