@@ -58,7 +58,7 @@ func triggerHTTPProbe(probe v1alpha1.ProbeAttributes, resultDetails *types.Resul
58
58
method := getHTTPMethodType (probe .HTTPProbeInputs .Method )
59
59
60
60
// initialize simple http client with default attributes
61
- timeout := time .Duration (probe .HTTPProbeInputs . ResponseTimeout ) * time .Millisecond
61
+ timeout := time .Duration (probe .RunProperties . ProbeTimeout ) * time .Millisecond
62
62
client := & http.Client {Timeout : timeout }
63
63
// impose properties to http client with cert check disabled
64
64
if probe .HTTPProbeInputs .InsecureSkipVerify {
@@ -75,7 +75,7 @@ func triggerHTTPProbe(probe v1alpha1.ProbeAttributes, resultDetails *types.Resul
75
75
"URL" : probe .HTTPProbeInputs .URL ,
76
76
"Criteria" : probe .HTTPProbeInputs .Method .Get .Criteria ,
77
77
"ResponseCode" : probe .HTTPProbeInputs .Method .Get .ResponseCode ,
78
- "ResponseTimeout" : probe .HTTPProbeInputs . ResponseTimeout ,
78
+ "ResponseTimeout" : probe .RunProperties . ProbeTimeout ,
79
79
})
80
80
if err := httpGet (probe , client , resultDetails ); err != nil {
81
81
return err
@@ -87,7 +87,7 @@ func triggerHTTPProbe(probe v1alpha1.ProbeAttributes, resultDetails *types.Resul
87
87
"Body" : probe .HTTPProbeInputs .Method .Post .Body ,
88
88
"BodyPath" : probe .HTTPProbeInputs .Method .Post .BodyPath ,
89
89
"ContentType" : probe .HTTPProbeInputs .Method .Post .ContentType ,
90
- "ResponseTimeout" : probe .HTTPProbeInputs . ResponseTimeout ,
90
+ "ResponseTimeout" : probe .RunProperties . ProbeTimeout ,
91
91
})
92
92
if err := httpPost (probe , client , resultDetails ); err != nil {
93
93
return err
@@ -111,9 +111,8 @@ func httpGet(probe v1alpha1.ProbeAttributes, client *http.Client, resultDetails
111
111
// it contains a timeout per iteration of retry. if the timeout expires without success then it will go to next try
112
112
// for a timeout, it will run the command, if it fails wait for the interval and again execute the command until timeout expires
113
113
return retry .Times (uint (probe .RunProperties .Retry )).
114
- Timeout (int64 (probe .RunProperties .ProbeTimeout )).
115
114
Wait (time .Duration (probe .RunProperties .Interval ) * time .Second ).
116
- TryWithTimeout (func (attempt uint ) error {
115
+ Try (func (attempt uint ) error {
117
116
// getting the response from the given url
118
117
resp , err := client .Get (probe .HTTPProbeInputs .URL )
119
118
if err != nil {
@@ -146,9 +145,8 @@ func httpPost(probe v1alpha1.ProbeAttributes, client *http.Client, resultDetails
146
145
// it contains a timeout per iteration of retry. if the timeout expires without success then it will go to next try
147
146
// for a timeout, it will run the command, if it fails wait for the interval and again execute the command until timeout expires
148
147
return retry .Times (uint (probe .RunProperties .Retry )).
149
- Timeout (int64 (probe .RunProperties .ProbeTimeout )).
150
148
Wait (time .Duration (probe .RunProperties .Interval ) * time .Second ).
151
- TryWithTimeout (func (attempt uint ) error {
149
+ Try (func (attempt uint ) error {
152
150
resp , err := client .Post (probe .HTTPProbeInputs .URL , probe .HTTPProbeInputs .Method .Post .ContentType , strings .NewReader (body ))
153
151
if err != nil {
154
152
return err
0 commit comments