]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: filters: Add attch/detach and stream_set_backend callbacks
authorChristopher Faulet <christopher.faulet@capflam.org>
Tue, 21 Jun 2016 09:42:37 +0000 (11:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 9 Nov 2016 21:50:54 +0000 (22:50 +0100)
commit31ed32dce4882c5966f3abb13243b0e2c0d16372
treedb916667aef242e22c16a5f07fef9de621f25b81
parent898566e7e65b73b19806ddaf92a941ef24b785ee
MEDIUM: filters: Add attch/detach and stream_set_backend callbacks

New callbacks have been added to handle creation and destruction of filter
instances:

* 'attach' callback is called after a filter instance creation, when it is
  attached to a stream. This happens when the stream is started for filters
  defined on the stream's frontend and when the backend is set for filters
  declared on the stream's backend. It is possible to ignore the filter, if
  needed, by returning 0. This could be useful to have conditional filtering.

* 'detach' callback is called when a filter instance is detached from a stream,
  before its destruction. This happens when the stream is stopped for filters
  defined on the stream's frontend and when the analyze ends for filters defined
  on the stream's backend.

In addition, the callback 'stream_set_backend' has been added to know when a
backend is set for a stream. It is only called when the frontend and the backend
are not the same. And it is called for all filters attached to a stream
(frontend and backend).

Finally, the TRACE filter has been updated.
include/types/filters.h
src/filters.c
src/flt_trace.c