itself. The "filter" directive is only supported by filters registering a
keyword with flt_register_keywords() (see section 3.2.2).
-The list of available filter keywords is reported by 'haproxy -vv' :
+The list of available filter classes is reported by 'haproxy -vv' :
$> haproxy -vv
HAProxy version 1.7-dev2-3a1d4a-33 2016/03/21
[...]
- Available filters :
- [COMP] compression
- [TRACE] trace
+ Available filter classes :
+ trace, cache-store, decomp-req, decomp-res, spoe, lua,
+ http-comp-req, http-comp-res, bwlim-in, bwlim-out, fcgi
Multiple filter lines can be used in a proxy section to chain filters. Filters
*** h1 0.0 debug|pref=150, test result FAILED
*** h1 0.0 debug|Total: 3 (2 usable), will use epoll.
*** h1 0.0 debug|
- *** h1 0.0 debug|Available filters :
- *** h1 0.0 debug|\t[SPOE] spoe
- *** h1 0.0 debug|\t[COMP] compression
- *** h1 0.0 debug|\t[TRACE] trace
+ *** h1 0.0 debug|Available filter classes :
+ *** h1 0.0 debug|\ttrace, cache-store, decomp-req, decomp-res, spoe,
+ *** h1 0.0 debug|\tlua, http-comp-req, http-comp-res, bwlim-in,
+ *** h1 0.0 debug|\tbwlim-out, fcgi
**** Slg_1 0.0 syslog|<133>Jun 7 14:12:51 haproxy[15787]: Proxy fe1 started.
** Slg_1 0.0 === recv
**** Slg_1 0.0 syslog|<133>Jun 7 14:12:51 haproxy[15787]: Proxy be_app started.
*** h1 0.0 debug| select : pref=150, test result FAILED
*** h1 0.0 debug|Total: 3 (2 usable), will use epoll.
*** h1 0.0 debug|
- *** h1 0.0 debug|Available filters :
- *** h1 0.0 debug|\t[SPOE] spoe
- *** h1 0.0 debug|\t[COMP] compression
- *** h1 0.0 debug|\t[TRACE] trace
+ *** h1 0.0 debug|Available filter classes :
+ *** h1 0.0 debug|\ttrace, cache-store, decomp-req, decomp-res, spoe,
+ *** h1 0.0 debug|\tlua, http-comp-req, http-comp-res, bwlim-in,
+ *** h1 0.0 debug|\tbwlim-out, fcgi
*** h1 0.0 debug|Using epoll() as the polling mechanism.
**** Slg_1 0.0 syslog|<133>Jun 7 14:10:18 haproxy[12728]: Proxy fe1 started.
** Slg_1 0.0 === recv
void flt_register_keywords(struct flt_kw_list *kwl);
struct flt_kw *flt_find_kw(const char *kw);
void flt_dump_kws(char **out);
-void list_filters(FILE *out);
+void list_filter_classes(FILE *out);
int flt_has_filter(const struct proxy *px);
}
/*
- * Lists the known filters on <out>
+ * Lists the known filter classes on <out>, in their global order
*/
void
-list_filters(FILE *out)
+list_filter_classes(FILE *out)
{
- char *filters, *p, *f;
+ struct filter_class *cls;
+ int first = 1;
- fprintf(out, "Available filters :\n");
- flt_dump_kws(&filters);
- for (p = filters; (f = strtok_r(p,"\n",&p));)
- fprintf(out, "\t%s\n", f);
- free(filters);
+ fprintf(out, "Available filter classes :\n\t");
+ list_for_each_entry(cls, &filter_classes, list) {
+ fprintf(out, "%s%s", first ? "" : ", ", cls->name);
+ first = 0;
+ }
+ if (first)
+ fprintf(out, "<none>");
+ fprintf(out, "\n");
}
/* Returns 1 if the proxy <px> has at least one active filter, legacy or
putchar('\n');
list_services(stdout);
putchar('\n');
- list_filters(stdout);
+ list_filter_classes(stdout);
putchar('\n');
ha_free(&feat_list);
}
if ((global.mode & (MODE_VERBOSE|MODE_DEBUG)) && !master) {
list_pollers(stderr);
fprintf(stderr, "\n");
- list_filters(stderr);
+ list_filter_classes(stderr);
}
if (!init_pollers()) {