Home

Awesome

lua-hiredis — Bindings for hiredis Redis-client library

See the copyright information in the file named COPYRIGHT.

Status of the project

The lua-hiredis module is pretty stable. It is heavily used in production under high load by the author and team. There are still some things to do (see TODO file) in the feature completeness field, this is why the module is not 1.0 yet. But all the features necessary for regular usage are here.

API

Connection

Error-code

Hiredis error codes (see docs), also available as hiredis.ERR_<something>:

Reply

Const-object

Const-object is a table with fields name and type.

There are three types of const-objects:

Use hiredis.unwrap_reply() to convert const-object to regular Lua value.

Note: Unwrapping is not done automatically to make array reply handling more straightforward.

Deprecated features

For backwards compatibility following status const-objects are aliased in the hiredis module table:

These aliases will eventually be removed in one of future releases, so, please, update your code to use hiredis.status.* instead.

More information

Read test/test.lua for examples. Read hiredis README for API motivation.