Skip to content

feat: add protocol option#2598

Merged
monkey92t merged 1 commit into
redis:masterfrom
ljun20160606:select-resp
May 16, 2023
Merged

feat: add protocol option#2598
monkey92t merged 1 commit into
redis:masterfrom
ljun20160606:select-resp

Conversation

@ljun20160606

@ljun20160606 ljun20160606 commented May 16, 2023

Copy link
Copy Markdown
Contributor

@monkey92t monkey92t left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@monkey92t monkey92t merged commit 3917988 into redis:master May 16, 2023
@monkey92t

monkey92t commented May 16, 2023

Copy link
Copy Markdown
Collaborator

Oh~ We forgot about ParseClusterURL in cluster.go. Can you send another PR to include it? @ljun20160606

go-redis/cluster.go

Lines 217 to 236 in 3917988

func setupClusterQueryParams(u *url.URL, o *ClusterOptions) (*ClusterOptions, error) {
q := queryOptions{q: u.Query()}
o.ClientName = q.string("client_name")
o.MaxRedirects = q.int("max_redirects")
o.ReadOnly = q.bool("read_only")
o.RouteByLatency = q.bool("route_by_latency")
o.RouteRandomly = q.bool("route_randomly")
o.MaxRetries = q.int("max_retries")
o.MinRetryBackoff = q.duration("min_retry_backoff")
o.MaxRetryBackoff = q.duration("max_retry_backoff")
o.DialTimeout = q.duration("dial_timeout")
o.ReadTimeout = q.duration("read_timeout")
o.WriteTimeout = q.duration("write_timeout")
o.PoolFIFO = q.bool("pool_fifo")
o.PoolSize = q.int("pool_size")
o.MinIdleConns = q.int("min_idle_conns")
o.PoolTimeout = q.duration("pool_timeout")
o.ConnMaxLifetime = q.duration("conn_max_lifetime")
o.ConnMaxIdleTime = q.duration("conn_max_idle_time")

@ljun20160606

ljun20160606 commented May 16, 2023

Copy link
Copy Markdown
Contributor Author

setupClusterQueryParams

Of course, I'm going to add it tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants