homework-jianmu/tests/examples/lua
robotspace d8d85667cb
Resolve problems that is met in CentOS7. (#5738)
* Set value for std with c99 to avoid compile error on CentOS7.

* Get parameter from stack by same sequence.

* Add performance test.
2021-04-09 13:05:51 +08:00
..
OpenResty Modify ignore list for subdirectory logs in OpenResty work directory. 2020-12-11 19:05:33 +08:00
lua51 Resolve problems that is met in CentOS7. (#5738) 2021-04-09 13:05:51 +08:00
README.md Resolve problems that is met in CentOS7. (#5738) 2021-04-09 13:05:51 +08:00
benchmark.lua Resolve problems that is met in CentOS7. (#5738) 2021-04-09 13:05:51 +08:00
build.sh Resolve problems that is met in CentOS7. (#5738) 2021-04-09 13:05:51 +08:00
lua_connector.c Resolve problems that is met in CentOS7. (#5738) 2021-04-09 13:05:51 +08:00
test.lua Set connection parameter with table as conventional style. Output result for test case. 2020-12-07 15:04:10 +08:00

README.md

TDengine driver connector for Lua

It's a Lua implementation for TDengine, an open-sourced big data platform designed and optimized for the Internet of Things (IoT), Connected Cars, Industrial IoT, and IT Infrastructure and Application Monitoring. You may need to install Lua5.3 .

Lua Dependencies

  • Lua:
https://www.lua.org/

Run with Lua Sample

Build driver lib:

./build.sh

Run lua sample:

lua test.lua

Run performance test:

time lua benchmark.lua

OpenResty Dependencies

  • OpenResty:
http://openresty.org

Run with OpenResty Sample

This section demonstrates how to get binary file for connector. To be convenient for trial, an connector has been put into OpenResty work directory. Because of difference on C API between Lua5.3 and Lua5.1, the files needed by connector for OpenResty are stored in local source directory and configured in script build.sh.

Build driver lib:

cd lua51
./build.sh

Run OpenResty sample:

cd ..
cd OpenResty
sudo openresty -p .
curl http://127.0.0.1:7000/api/test