Skip to content

aiyanbo/lua-resty-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Name

lua-resty-utils - OpenResty Lua Utils, include collections, redis.

Table of Contents

Synopsis

Collections

    # 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
    )

About

OpenResty Lua Utils

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages