DocuSignDev/node-redis-sentinel-client — pull request #13 by yanatan16 (2014-04-18 00:26:52+00:00)
Title: Rewrite of the client wrapper

I wanted to let y'all know what I had to do to get this working for our system. We do pub/sub, blocking pop calls, multi calls, script calls, and more regular set/get stuff in our application. The setup before didn't seem to do it for blocking calls. We also pass around the redis instance a lot so `.getMaster()` wasn't really a viable option.

Often I ended up with errors like this:
```
Error: sentinel-i01.redis.staging:8379-staging-master master error: node_redis command queue state error. If you can reproduce this, please report it.
```
which is quite scary really. It means the driver was receiving replies for which it wasn't expecting. I decided the most likely cause of this nastiness was the idea that the client's host and port were being changed out from under it.

In order to solve this very core (hypothetical) problem, I had to rewrite a majority of the client wrapper. That is what you see in this pull request.

A couple additional things:
- add an example sentinel config
- add a test where the failover is done manually
- fix the failover-start event because the sentinel event is now `try-failover`
- simplify handling of errors and events to pass through to top level client wrapper