File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
storage_versioned_docs/version-clickhouse_v0.x.x/redis Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,12 @@ store := redis.New(redis.Config{
86
86
Addrs : []string {" :6379" , " :6380" },
87
87
})
88
88
89
+ // Initialize AWS ElastiCache Redis Cluster with Configuration Endpoint
90
+ store := redis.New (redis.Config {
91
+ Addrs : []string {" cluster.xxxxx.cache.amazonaws.com:6379" },
92
+ IsClusterMode : true ,
93
+ })
94
+
89
95
// Create a client with support for TLS
90
96
cer , err := tls.LoadX509KeyPair (" ./client.crt" , " ./client.key" )
91
97
if err != nil {
@@ -183,6 +189,12 @@ type Config struct {
183
189
//
184
190
// Optional. Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS.
185
191
PoolSize int
192
+
193
+ // IsClusterMode forces cluster mode even with single address.
194
+ // Useful for AWS ElastiCache Configuration Endpoints.
195
+ //
196
+ // Optional. Default is false
197
+ IsClusterMode bool
186
198
}
187
199
```
188
200
@@ -203,6 +215,7 @@ var ConfigDefault = Config{
203
215
ClientName : " " ,
204
216
SentinelUsername : " " ,
205
217
SentinelPassword : " " ,
218
+ IsClusterMode : false ,
206
219
}
207
220
```
208
221
You can’t perform that action at this time.
0 commit comments