Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 1.24 KB

README.md

File metadata and controls

58 lines (37 loc) · 1.24 KB

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 => 'yukirii/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 RedisCluster client and RedisClusterCRC16 module in mruby-redis-cluster based on antirez/redis-rb-cluster.