Fork me on GitHub

随笔分类 -  lua

lua脚本语言的记录
摘要:背景 随着openresty的出现,让nginx使用lua解决一些业务的能力大幅度提高,ngx_lua可以使用nginx自生的基于事件驱动的IO模型,和后端的存储,业务等系统实现非阻塞的连接交互。 如何使用ngx_lua连接后端的Thrift-Server呢? 基于这个需求,本人为ngx_lua做了 阅读全文
posted @ 2016-04-08 10:01 Mr.YF 阅读(4976) 评论(0) 推荐(0)
摘要:lua的库文件地址: http://luaforge.net/projects/lua官网 http://lua.org --[[ print string. multiple line comments. like {} in Tcl. ]]-- print ("hello") -- commen 阅读全文
posted @ 2015-12-23 18:54 Mr.YF 阅读(570) 评论(0) 推荐(0)
摘要:==========================example for lua json=======================local cjson = require("cjson")local str = '["a", "b", "c"]'local j = cjson.decode... 阅读全文
posted @ 2015-12-23 18:49 Mr.YF 阅读(2244) 评论(0) 推荐(0)