1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Make readOnly a private field so that only cluster client can use it

This commit is contained in:
wenjun.yan
2017-07-25 10:35:41 +09:00
parent e8e77ae5e4
commit 4e1d2a01db
4 changed files with 7 additions and 9 deletions

View File

@ -17,12 +17,11 @@ type UniversalOptions struct {
// Only single-node and failover clients.
DB int
// Enables read only queries on slave nodes.
// Only cluster and single-node clients.
ReadOnly bool
// Only cluster clients.
// Enables read only queries on slave nodes.
ReadOnly bool
MaxRedirects int
RouteByLatency bool
@ -93,7 +92,6 @@ func (o *UniversalOptions) simple() *Options {
return &Options{
Addr: addr,
DB: o.DB,
ReadOnly: o.ReadOnly,
MaxRetries: o.MaxRetries,
Password: o.Password,