forked from JointCloud/pcm-coordinator
云算提交任务添加ip信息
This commit is contained in:
parent
f4de311e65
commit
8693a0af0e
|
@ -166,7 +166,7 @@ type (
|
|||
StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
|
||||
ReqBody []string `json:"reqBody"`
|
||||
Replicas int64 `json:"replicas,string"`
|
||||
UserIp string `json:"userIp"`
|
||||
UserIp string `json:"userIp,optional"`
|
||||
}
|
||||
|
||||
PodLogsReq {
|
||||
|
|
|
@ -150,7 +150,7 @@ type GeneralTaskReq struct {
|
|||
StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
|
||||
ReqBody []string `json:"reqBody"`
|
||||
Replicas int64 `json:"replicas,string"`
|
||||
UserIp string `json:"userIp"`
|
||||
UserIp string `json:"userIp,optional"`
|
||||
}
|
||||
|
||||
type PodLogsReq struct {
|
||||
|
|
|
@ -18,7 +18,7 @@ type EvidenceParam struct {
|
|||
func Evidence(EvidenceParam EvidenceParam) error {
|
||||
httpClient := resty.New().R()
|
||||
_, err := httpClient.SetHeader("Content-Type", "application/json").
|
||||
SetHeader("Proxy-Client-IP", EvidenceParam.UserIp).
|
||||
SetHeader("X-Forwarded-For", EvidenceParam.UserIp).
|
||||
SetHeader("Authorization", EvidenceParam.Token).
|
||||
SetBody(&EvidenceParam).
|
||||
Post(EvidenceParam.Url)
|
||||
|
|
Loading…
Reference in New Issue