]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: applet: add an execution timeout
authorThierry FOURNIER <tfournier@arpalert.org>
Mon, 21 Sep 2015 22:02:58 +0000 (00:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 27 Sep 2015 23:03:48 +0000 (01:03 +0200)
This patch only declares the execution timeout variable. The applet
must be respect or ignore it. For example an applet who doing some
network accesses and doesn't control its execution yime should use
this timeout.

include/types/applet.h

index 13817b22aa3e6910f09f13ee7f235755097fe7e3..799df91a33f6aff7c7fe9c1253e17a57afa60cdd 100644 (file)
@@ -40,6 +40,7 @@ struct applet {
                                             expect 1 if ok, 0 if an error occurs, -1 if miss data. */
        void (*fct)(struct appctx *);      /* internal I/O handler, may never be NULL */
        void (*release)(struct appctx *);  /* callback to release resources, may be NULL */
+       unsigned int timeout;              /* execution timeout. */
 };
 
 /* Context of a running applet. */