MINOR: lua: add AppletTCP class and service
This class is used by Lua code for running as an applet called in TCP mode.
It defines also the lua service.
diff --git a/include/types/hlua.h b/include/types/hlua.h
index 1bf2a75..eccfc6c 100644
--- a/include/types/hlua.h
+++ b/include/types/hlua.h
@@ -17,6 +17,7 @@
#define CLASS_CHANNEL "Channel"
#define CLASS_HTTP "HTTP"
#define CLASS_MAP "Map"
+#define CLASS_APPLET_TCP "AppletTCP"
struct stream;
@@ -98,6 +99,13 @@
struct proxy *p;
};
+/* This struct contains the applet context. */
+struct hlua_appctx {
+ struct appctx *appctx;
+ luaL_Buffer b; /* buffer used to prepare strings. */
+ struct hlua_txn htxn;
+};
+
/* This struc is used with sample fetches and sample converters. */
struct hlua_smp {
struct stream *s;