The shared dict feature was using TCL (for hashtable and related stuff) and we don't want to add a dependency at that time on TCL. So we took that feature out when we are adding the plugin to ATS repo. I think it is not that difficult to add this back in without TCL and contributions are welcome :)
On Tue, Dec 1, 2020 at 10:12 PM Lei Sun <[email protected]> wrote: > > Hi Kit, > > Thank you so much for your help! I was able to get this working. > > I saw on the documentation > https://github.com/portl4t/ts-lua/wiki/Doc#tsshareddict, that there is the > ts.shared.DICT feature. However, I couldn't get it to work according to the > documentation. > > Could you please let me know if I'm missing something? > > Thanks, > Lei > > > > On Sun, Nov 29, 2020 at 11:44 PM Shu Kit Chan <[email protected]> wrote: >> >> Are you running the plugin as a remap plugin or not ? >> >> If you are using the lua plugin in plugin.config, then the entry >> functions are those that start with "do_global_" >> If you are using it in the remap.config, then the entry function is >> do_remap() >> >> Thanks. >> >> Kit >> >> On Sun, Nov 29, 2020 at 8:50 PM Lei Sun <[email protected]> wrote: >> > >> > Hi Guys, >> > >> > I'm trying to setup ATS with LUA. I started the server no problem, and >> > didn't see any issues loading the LUA plugin. >> > >> >> leisun@/usr/local/etc/trafficserver$ sudo traffic_server -T"ts_lua" >> >> Traffic Server 10.0.0 Nov 29 2020 15:56:51 Leis-MacBook-Pro.local >> >> traffic_server: using root directory '/usr/local' >> >> [Nov 29 22:43:54.442] DIAG: (ts_lua) [create_lua_vms] registered config >> >> string proxy.config.plugin.lua.max_states: with default [256] >> >> [Nov 29 22:43:54.443] DIAG: (ts_lua) [create_lua_vms] found >> >> proxy.config.plugin.lua.max_states: [256] >> > >> > >> > However, as I was curling the server, and the ATS seems to be doing it's >> > proxy job fine, but I cannot see any logs coming out of the following LUA >> > script. >> >> >> >> function send_request() >> >> local uri = ts.server_request.get_uri() >> >> ts.debug(uri) >> >> ts.note('send_request') >> >> ts.error('send_request') >> >> ts.warning('send_request') >> >> end >> >> >> >> function do_remap() >> >> ts.note('do_remap') >> >> ts.error('do_remap') >> >> ts.warning('do_remap') >> >> ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request) >> >> return 0 >> >> end >> > >> > >> > I spent 2 full days searching online, and didn't get much luck. >> > >> > Could someone please let me know what I missed? >> > >> > PS - how do I get invited to the Slack channel please? >> > >> > Thank you so much! >> > Lei >> > > > > > -- > Stay Hungry, Stay Foolish. > Lei Sun > Cell: 408-306-9199
