mruby-redis-cluster is a mruby client library for Redis Cluster based on matsumotory/mruby-redis.
Add conf.gem line to build_config.rb
:
MRuby::Build.new do |conf|
# ... (snip) ...
conf.gem :github => 'yukirii/mruby-redis-cluster'
end
startup_nodes = [
{ host: '127.0.0.1', port: 7000 },
{ host: '127.0.0.1', port: 7001 }
]
rc = RedisCluster.new(startup_nodes)
Redis#expire
doc
client.expire key, 10
Redis#get
doc
client.get "key"
Redis#set
doc
client.set key, "200"
The RedisCluster client and RedisClusterCRC16 module in mruby-redis-cluster based on antirez/redis-rb-cluster.