Skip to content

i2bskn/redis_eval

Repository files navigation

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.

About

Evaluate Lua scripts with Redis.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published