Closed Leon-Liangming closed 8 years ago
I'm sorry it's taken so long to respond, for some reason github decided I shouldn't receive notifications for issues on the repo >_<
You're correct that there's currently no way to do auth with a cluster. It's a feature I still need to add, and still need to figure out the best way to add. I'll try to look into it in the upcoming weeks.
Yeah, this would be a nice feature. +1
Hey all! I've implemented this feature, though I haven't merged it into master yet. If you want to check it out the branch is cluster-dialer
. What I've done is to give the Opts
struct a field called Dialer
, which takes a function with the signature func(network, addr string) (*redis.Client, error)
. If set that function will be used to construct new redis clients for the cluster pools, and inside there is where you would do your authentication.
If you get a chance to check it out let me know what you think and if there's any improvements you can see being made. Thanks!
ping @Leon-Liangming @maticmeznar, what do you all think?
Alright well ready or not this merge is happening
I want to connect to the redis cluster which has password, but i can't init the cluster client, i get this fail info "NOAUTH Authentication required." I read some code and find it has request cmd to the redis in The cluster.New()-->c.Reset().
I think if the new() func have auth process may be good