vmihailenco/redis — pull request #27 by dim (2014-04-12 12:12:14+00:00)
Title: Sentinel support

Hi,

I added a draft support for Redis Sentinel, but - before I start adding tests - I have two questions.

Firstly, I cannot run tests on go1.2 as the `export_test.go` file seems to be ignored. I get:
```
$ go test ./v2
v2/redis_test.go:183: t.client.Pool undefined (type *redis.Client has no field or method Pool)
```

Secondly, the guide to for writing sentinel clients (http://redis.io/topics/sentinel-clients) suggests to perform a discovery only once per pool. It states:

> in case of a master address change all the existing connections should be closed and connected to the new address

I am not quite sure how this is supposed to work with the current pool implementation. This would (ideally) require an evented (`select / case`) pool to avoid complicated locking. The current approach on the other hand is straight-forward, but may introduce significant overhead with large pools. Ideas welcome!

Thanks,
dim