Cluster returns cluster options created from the universal options.
()
| 155 | |
| 156 | // Cluster returns cluster options created from the universal options. |
| 157 | func (o *UniversalOptions) Cluster() *ClusterOptions { |
| 158 | if len(o.Addrs) == 0 { |
| 159 | o.Addrs = []string{"127.0.0.1:6379"} |
| 160 | } |
| 161 | |
| 162 | return &ClusterOptions{ |
| 163 | Addrs: o.Addrs, |
| 164 | ClientName: o.ClientName, |
| 165 | Dialer: o.Dialer, |
| 166 | OnConnect: o.OnConnect, |
| 167 | |
| 168 | Protocol: o.Protocol, |
| 169 | Username: o.Username, |
| 170 | Password: o.Password, |
| 171 | CredentialsProvider: o.CredentialsProvider, |
| 172 | CredentialsProviderContext: o.CredentialsProviderContext, |
| 173 | StreamingCredentialsProvider: o.StreamingCredentialsProvider, |
| 174 | |
| 175 | MaxRedirects: o.MaxRedirects, |
| 176 | ReadOnly: o.ReadOnly, |
| 177 | RouteByLatency: o.RouteByLatency, |
| 178 | RouteRandomly: o.RouteRandomly, |
| 179 | |
| 180 | MaxRetries: o.MaxRetries, |
| 181 | MinRetryBackoff: o.MinRetryBackoff, |
| 182 | MaxRetryBackoff: o.MaxRetryBackoff, |
| 183 | |
| 184 | DialTimeout: o.DialTimeout, |
| 185 | DialerRetries: o.DialerRetries, |
| 186 | DialerRetryTimeout: o.DialerRetryTimeout, |
| 187 | ReadTimeout: o.ReadTimeout, |
| 188 | WriteTimeout: o.WriteTimeout, |
| 189 | |
| 190 | ContextTimeoutEnabled: o.ContextTimeoutEnabled, |
| 191 | |
| 192 | ReadBufferSize: o.ReadBufferSize, |
| 193 | WriteBufferSize: o.WriteBufferSize, |
| 194 | |
| 195 | PoolFIFO: o.PoolFIFO, |
| 196 | PoolSize: o.PoolSize, |
| 197 | MaxConcurrentDials: o.MaxConcurrentDials, |
| 198 | PoolTimeout: o.PoolTimeout, |
| 199 | MinIdleConns: o.MinIdleConns, |
| 200 | MaxIdleConns: o.MaxIdleConns, |
| 201 | MaxActiveConns: o.MaxActiveConns, |
| 202 | ConnMaxIdleTime: o.ConnMaxIdleTime, |
| 203 | ConnMaxLifetime: o.ConnMaxLifetime, |
| 204 | ConnMaxLifetimeJitter: o.ConnMaxLifetimeJitter, |
| 205 | |
| 206 | TLSConfig: o.TLSConfig, |
| 207 | |
| 208 | DisableIdentity: o.DisableIdentity, |
| 209 | DisableIndentity: o.DisableIndentity, |
| 210 | IdentitySuffix: o.IdentitySuffix, |
| 211 | FailingTimeoutSeconds: o.FailingTimeoutSeconds, |
| 212 | UnstableResp3: o.UnstableResp3, |
| 213 | PushNotificationProcessor: o.PushNotificationProcessor, |
| 214 | MaintNotificationsConfig: o.MaintNotificationsConfig, |
no outgoing calls
no test coverage detected