Hello,
I published redisc
to github, a redis cluster client built as a layer on top of redigo (it calls redigo to execute commands, redisc only manages the cluster-specific details): https://github.com/PuerkitoBio/redisc
Among interesting features:
- the Cluster type can be a drop-in replacement for redis.Pool in simple cases or when keys have been carefully named for use in a cluster (using hash tags)
- the connections are redis.Conn interfaces, meaning the API is exactly the same as when using redigo
- all redis cluster-supported commands can be executed, including pub-sub, transactions and scripting (examples in the godoc)
- smart routing (the cluster keeps track of which node serves which slot, and automatically updates the mapping on MOVED replies)
- call RetryConn to get a connection that automatically retries when redis returns MOVED, ASK or TRYAGAIN errors
- possibility to explicitly bind a connection to a node ahead of use, instead of relyiing on the detection of the key (useful when the command doesn’t have a key or when the key is not the first parameter)
See the godoc for full details: https://godoc.org/github.com/PuerkitoBio/redisc
Thanks,
Martin Angers