*/
PROXY_DECLARE(apr_port_t) ap_proxy_port_of_scheme(const char *scheme);
+/**
+ * Return the name of the health check method (eg: "OPTIONS").
+ * @param method method enum
+ * @return name of method
+ */
+PROXY_DECLARE (const char *) ap_proxy_show_hcmethod(hcmethod_t method);
+
/**
* Strip a unix domain socket (UDS) prefix from the input URL
* @param p pool to allocate result from
}
}
-static const char *show_hcmethod(hcmethod_t method)
-{
- hcmethods_t *m = hcmethods;
- for (; m->name; m++) {
- if (m->method == method) {
- return m->name;
- }
- }
- return "???";
-}
-
/* Manages the loadfactors and member status
* The balancer, worker and nonce are obtained from
* the request args (?b=...&w=...&nonce=....).
ap_rputs("</td><td>", r);
ap_rputs(apr_strfsize(worker->s->read, fbuf), r);
if (set_worker_hc_param_f) {
- ap_rprintf(r, "</td><td>%s</td>", show_hcmethod(worker->s->method));
+ ap_rprintf(r, "</td><td>%s</td>", ap_proxy_show_hcmethod(worker->s->method));
ap_rprintf(r, "<td>%d</td>", (int)apr_time_sec(worker->s->interval));
ap_rprintf(r, "<td>%d</td>", worker->s->passes);
ap_rprintf(r, "<td>%d</td>", worker->s->fails);
return 0;
}
+PROXY_DECLARE (const char *) ap_proxy_show_hcmethod(hcmethod_t method)
+{
+ hcmethods_t *m = hcmethods;
+ for (; m->name; m++) {
+ if (m->method == method) {
+ return m->name;
+ }
+ }
+ return "???";
+}
+
void proxy_util_register_hooks(apr_pool_t *p)
{
APR_REGISTER_OPTIONAL_FN(ap_proxy_retry_worker);