ParseFailoverURL parses a URL into FailoverOptions that can be used to connect to Redis. The URL must be in the form: redis://<user>:<password>@<host>:<port>/<db_number> or rediss://<user>:<password>@<host>:<port>/<db_number> To add additional addresses, specify the query parameter, "addr" one
(redisURL string)
| 389 | // ReadTimeout: 6 * time.Second, |
| 390 | // } |
| 391 | func ParseFailoverURL(redisURL string) (*FailoverOptions, error) { |
| 392 | u, err := url.Parse(redisURL) |
| 393 | if err != nil { |
| 394 | return nil, err |
| 395 | } |
| 396 | return setupFailoverConn(u) |
| 397 | } |
| 398 | |
| 399 | func setupFailoverConn(u *url.URL) (*FailoverOptions, error) { |
| 400 | o := &FailoverOptions{} |
nothing calls this directly
no test coverage detected