Welcome! Log In Create A New Profile

Advanced

Re: lua parser and redis2 questions

June 04, 2011 08:49AM
I'm new to redis/nginx combinations, however I think you should also add following modules:
-https://github.com/agentzh/lua-redis-parser
-https://github.com/chaoslawful/lua-nginx-module.

Then you can use

content_by_lua '
local replies = ngx.location.capture("/redis2")
local parser = require('redis.parser')
-- assuming the replies variable holds n redis responses
-- to be parsed:
local results = parser.parse_replies(replies, n)
for i, result in ipairs(results) do
local res = result[1]
local typ = result[2]
-- res and typ have exactly the same meaning as in
-- the parse_reply method documented above
end
'
Subject Author Posted

lua parser and redis2 questions

gregr401 June 01, 2011 07:27PM

Re: lua parser and redis2 questions

logar.damir June 04, 2011 08:49AM

Re: lua parser and redis2 questions

Marcos Ortiz June 04, 2011 11:12AM

Re: lua parser and redis2 questions

Marcos Ortiz June 04, 2011 11:16AM

Re: lua parser and redis2 questions

agentzh June 04, 2011 11:22AM

Re: lua parser and redis2 questions

gregr401 June 04, 2011 02:15PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 04:06AM

Re: lua parser and redis2 questions

logar.damir June 04, 2011 04:26PM

Re: lua parser and redis2 questions

gregr401 June 05, 2011 06:40PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 04:12AM

Re: lua parser and redis2 questions

logar.damir June 06, 2011 07:16AM

Re: lua parser and redis2 questions

agentzh June 06, 2011 10:56AM

Re: lua parser and redis2 questions

gregr401 June 06, 2011 12:50PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 09:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 136
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready