@@ -80,33 +80,18 @@ type CosmosDB struct {
8080}
8181
8282type Redis struct {
83- // Redis endpoint (host:port)
84- Endpoint string
85- // Username for Redis authentication (Redis 6.0+)
86- Username string
87- // Password for Redis authentication
88- Password string
89- // Database number to select
90- Database int
91- // Connection pool size
92- PoolSize int
93- // Timeout for dial, read, and write operations
94- DialTimeout time.Duration
95- ReadTimeout time.Duration
96- WriteTimeout time.Duration
97- 98- Namespace string // Prefix for all keys used by the application
99- 100- // MemoryDB and TLS specific configuration
101- EnableTLS bool // Force TLS for MemoryDB
102- TLSSkipVerify bool // Skip cert verification (dev only)
103- AWSRegion string // AWS region for IAM auth
104- AWSProfile string // AWS profile
105- AWSAccessKeyID string // AWS credentials
106- AWSSecretAccessKey string // AWS credentials
107- UseIAMAuth bool // Enable IAM authentication
108- 109- ClusterMode bool // Support Redis Cluster mode
83+ Endpoint string // Endpoint is the single address (host:port) or ';' separated addresses for cluster
84+ Username string
85+ Password string
86+ Database int // Database number to select
87+ PoolSize int // Connection pool size
88+ DialTimeout time.Duration
89+ ReadTimeout time.Duration
90+ WriteTimeout time.Duration
91+ Namespace string // Namespace is a prefix for all keys
92+ EnableTLS bool
93+ ClusterMode bool
94+ TLSSkipVerify bool // Skip cert verification (dev only)
11095}
11196
11297func NewConfig (cfg * config.Database ) (Config , error ) {
@@ -165,23 +150,18 @@ func NewConfig(cfg *config.Database) (Config, error) {
165150
166151 if cfg .Redis != nil {
167152 p .Redis = & Redis {
168- Endpoint : cfg .Redis .Endpoint ,
169- Username : cfg .Redis .Username ,
170- Password : cfg .Redis .Password .SecureValue (),
171- Database : cfg .Redis .Database ,
172- PoolSize : cfg .Redis .PoolSize ,
173- DialTimeout : cfg .Redis .DialTimeout ,
174- ReadTimeout : cfg .Redis .ReadTimeout ,
175- WriteTimeout : cfg .Redis .WriteTimeout ,
176- Namespace : cfg .Redis .Namespace ,
177- EnableTLS : cfg .Redis .EnableTLS ,
178- TLSSkipVerify : cfg .Redis .TLSSkipVerify ,
179- AWSRegion : cfg .Redis .AWSRegion ,
180- AWSProfile : cfg .Redis .AWSProfile ,
181- AWSAccessKeyID : cfg .Redis .AWSAccessKeyID .SecureValue (),
182- AWSSecretAccessKey : cfg .Redis .AWSSecretAccessKey .SecureValue (),
183- UseIAMAuth : cfg .Redis .UseIAMAuth ,
184- ClusterMode : cfg .Redis .ClusterMode ,
153+ Endpoint : cfg .Redis .Endpoint ,
154+ Username : cfg .Redis .Username ,
155+ Password : cfg .Redis .Password .SecureValue (),
156+ Database : cfg .Redis .Database ,
157+ PoolSize : cfg .Redis .PoolSize ,
158+ DialTimeout : cfg .Redis .DialTimeout ,
159+ ReadTimeout : cfg .Redis .ReadTimeout ,
160+ WriteTimeout : cfg .Redis .WriteTimeout ,
161+ Namespace : cfg .Redis .Namespace ,
162+ EnableTLS : cfg .Redis .EnableTLS ,
163+ ClusterMode : cfg .Redis .ClusterMode ,
164+ TLSSkipVerify : cfg .Redis .TLSSkipVerify ,
185165 }
186166 }
187167 return p , nil
0 commit comments