MINOR: lua: txn: import existing sample-fetches in the class TXN

This patch adds the browsing of all the HAProxy fetches and
create associated LUA functions. The HAProxy internal fetches
can be used in LUA trough the class "TXN".

Note that the symbols "-", "+" and "." in the name of current
sample fetch are rewrited as "_" in LUA because ".", "-" and "+"
are operators.
This commit is contained in:
Thierry FOURNIER
2015-02-16 20:14:51 +01:00
committed by Willy Tarreau
parent 05c0b8ab0d
commit d0fa538fe3
2 changed files with 99 additions and 0 deletions

View File

@@ -63,4 +63,14 @@ struct hlua_txn {
void *l7;
};
/* This struct is used as a closure argument associated
* with dynamic sample-fetch created fucntions. This contains
* a pointer to the original sample_fetch struct. It is used
* to identify the function to execute with the sample fetch
* wrapper.
*/
struct hlua_sample_fetch {
struct sample_fetch *f;
};
#endif /* _TYPES_HLUA_H */