A mruby client library for Redis Cluster based on matsumotory/mruby-redis
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
mrblib
src
test
.gitignore
.travis.yml
.travis_build_config.rb
LICENSE
README.md
Rakefile
docker-compose.yml
mrbgem.rake
mruby-redis-cluster.gem

README.md

mruby-redis-cluster Build Status

mruby-redis-cluster is a mruby client library for Redis Cluster based on matsumotory/mruby-redis.

INSTALLATION

Using mrbgems

Add conf.gem line to build_config.rb:

MRuby::Build.new do |conf|

  # ... (snip) ...

  conf.gem :github => 'shiftky/mruby-redis-cluster'
end

USAGE

Connecting to a Redis Cluster

startup_nodes = [
  { host: '127.0.0.1', port: 7000 },
  { host: '127.0.0.1', port: 7001 }
]
rc = RedisCluster.new(startup_nodes)

Commands

Redis#expire doc

client.expire key, 10

Redis#get doc

client.get "key"

Redis#set doc

client.set key, "200"

License

MIT

Authors

The C extension in mruby-redis-cluster is a same as matsumotory/mruby-redis.

The RedisCluster client and RedisClusterCRC16 module in mruby-redis-cluster based on antirez/redis-rb-cluster.