Quantcast
Channel: redigo different pool connect to single server - Stack Overflow
Browsing index pages (2 articles)

redigo different pool connect to single server

so, i have a necessity to connect to 3 redis server. i create 3 connection pool, and initialize each of them. but redigo seems only connected to single redis server, although i get the connection...

View Article


Answer by Cerise Limón for redigo different pool connect to single server

The dial functions use the single variable v. The functions use the last value assigned to v when called. To fix the problem, declare a variable inside the scope of the for loop and use that variable...

View Article

Browsing index pages (2 articles)


Latest Images