Project

redis_eval

0.0
No commit activity in last 3 years
No release in over 3 years
Evaluate Lua scripts with Redis.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.1.0
~> 0.14.0
~> 13.0.0
~> 3.10.0
~> 1.11.0

Runtime

>= 0
 Project Readme

RedisEval

Gem Version CI

Evaluate Lua scripts with Redis.

Installation

Add this line to your application's Gemfile:

gem "redis_eval"

And then execute:

$ bundle

Or install it yourself as:

$ gem install redis_eval

Usage

Build and execute a script source as argument.

script = RedisEval::Script.new("return {KEYS[1], ARGV[1]}")
script.execute([1], [2]) # => ["1", "2"]

Find and build scripts from a specific directory.

scripts = RedisEval::ScriptSet.new("/path/to/script_dir")
scripts.hello.execute(keys, argv) # build /path/to/script_dir/hello.lua and run.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/i2bskn/redis_eval.

License

The gem is available as open source under the terms of the MIT License.