wrapper to choose between a remap next hop strategy or use parent.config remap next hop strategy is preferred
| 207 | // wrapper to choose between a remap next hop strategy or use parent.config |
| 208 | // remap next hop strategy is preferred |
| 209 | inline static void |
| 210 | findParent(HttpTransact::State *s) |
| 211 | { |
| 212 | url_mapping *mp = s->url_map.getMapping(); |
| 213 | Metrics::Counter::increment(http_rsb.parent_count); |
| 214 | if (s->response_action.handled) { |
| 215 | s->parent_result.hostname = s->response_action.action.hostname; |
| 216 | s->parent_result.port = s->response_action.action.port; |
| 217 | s->parent_result.retry = s->response_action.action.is_retry; |
| 218 | if (!s->response_action.action.fail) { |
| 219 | s->parent_result.result = PARENT_SPECIFIED; |
| 220 | } else if (s->response_action.action.goDirect) { |
| 221 | s->parent_result.result = PARENT_DIRECT; |
| 222 | } else { |
| 223 | s->parent_result.result = PARENT_FAIL; |
| 224 | } |
| 225 | } else if (mp && mp->strategy) { |
| 226 | mp->strategy->findNextHop(reinterpret_cast<TSHttpTxn>(s->state_machine)); |
| 227 | } else if (s->parent_params) { |
| 228 | s->parent_params->findParent(&s->request_data, &s->parent_result, s->txn_conf->parent_fail_threshold, |
| 229 | s->txn_conf->parent_retry_time); |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | // wrapper to choose between a remap next hop strategy or use parent.config |
| 234 | // remap next hop strategy is preferred |
no test coverage detected