redis-cluster
redis-cluster library for Crystal
- tested on crystal-0.18.7
Installation
Add this to your application's shard.yml
:
dependencies:
redis-cluster:
github: maiha/redis-cluster.cr
Usage
- assumes that our cluster is runing on localhost:7001 and 7002, ...
require "redis-cluster"
bootstrap = "127.0.0.1:7001,127.0.0.1:7002"
cluster = Redis::Cluster.new(bootstrap)
cluster.set "foo", "123"
cluster.get "foo" # => "123"
cluster.counts.values # => [0, 0, 1]
cluster.close
Supported API
see API
TODO
v0.5.0
- [ ] Commands : Sorted Sets
- [x] Commands : Strings
- [x] Commands : Lists
Contributing
- Fork it ( https://github.com/maiha/redis-cluster.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- maiha maiha - creator, maintainer