lua-resty-utils
OpenResty Lua 工具集
$ opm get aiyanbo/lua-resty-utils
名称
lua-resty-utils - OpenResty Lua 工具集,包含 collections
, redis
.
概要
集合
# import module
local collections = require("resty.collections")
local expressions = {
"^/users/\\w+$",
"^/users/\\w+/trades/\\d+$"
}
local matched = collections.key_matched(expressions, "/users/W1234567")
print(matched) -- print true
Redis
# import module
local redis = require("resty.rediscli")
local red = redis.new({host = "127.0.0.1", ...})
local res, err = red:exec(
function(red)
return red:get(key)
end
)
作者
Andy Ai
许可证
mit
依赖
openresty >= 1.11.2.1
版本
-
aiyanbo/lua-resty-utils 1.0.1OpenResty Lua 工具集 2021-10-11 06:14:15
-
aiyanbo/lua-resty-utils 1.0.0OpenResty Lua 工具集 2016-11-12 08:29:42