Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
local wrapper_loadstring = function(str_code)
local api_fun, err = loadstring("return function (edge_computing) " .. str_code .. " end")
if api_fun then return api_fun() else return api_fun, err end
-- ... compile cu["code] = wrapper_loadstring(raw_code)
local status, ret = pcall(cu["code"], {redis_client=edge_computing.redis_client})
-- CU in Redis --
-- set authentication "rewrite||local resp, err = edge_computing.redis_client:incr(\"key\") \n ngx.log(ngx.ERR, \" >>>> \", resp) \n"
local resp, err = edge_computing.redis_client:incr("key")
ngx.log(ngx.ERR, " >>>> ", resp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.