lua-resty-radixtree

This is a radixtree implementation base on FFI for Lua-Openresty

$ luarocks install lua-resty-radixtree

local radix = require("resty.radixtree")
local rx = radix.new({
{
path = "/aa",
metadata = "metadata /aa",
host = "foo.com",
method = {"GET", "POST"},
remote_addr = "127.0.0.1",
},
{
path = "/bb*",
metadata = "metadata /bb",
host = {"*.bar.com", "gloo.com"},
method = {"GET", "POST", "PUT"},
remote_addr = "fe80:fe80::/64",
}
})

-- should hit
ngx.say(rx:match("/aa", {host = "foo.com",
method = "GET",
remote_addr = "127.0.0.1"}))

Versions

0.5-01 day ago36 downloads
0.4-013 days ago181 downloads
0.3-014 days ago3 downloads

Manifests