Skip to content

Move common parts of redis connection interface to common#6177

Merged
mattklein123 merged 9 commits intoenvoyproxy:masterfrom
HenryYYang:refactor-commands
Mar 8, 2019
Merged

Move common parts of redis connection interface to common#6177
mattklein123 merged 9 commits intoenvoyproxy:masterfrom
HenryYYang:refactor-commands

Conversation

@FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg
Copy link
Copy Markdown
Contributor

@FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg commented Mar 5, 2019

This is part of the effort to build a proxy for Redis Cluster (#5697).

We want to make some of the connection interface common so we can share it with the cluster proxy. Specifically, we take redis_proxy/conn_pool.h and move much of it besides Instance to common/redis/client.h, and adjust the rest of the project to work with this. The formatting tool did some spacing stuff as well.

Following this, we will want to make an upstream command abstraction (for commands sent by Envoy upstream and that come back and terminate at Envoy) such as the health checks (exist, ping) and cluster (cluster slots).

Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
@FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg
Copy link
Copy Markdown
Contributor Author

oops, I'll fix those errors

@mattklein123
Copy link
Copy Markdown
Member

@HenryYYang for first pass.

@FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg
Copy link
Copy Markdown
Contributor Author

As it turns out, the formatter rearranges imports, and this breaks the build! Hence my testing working locally, as I didn't test post-formatto.

Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
namespace Redis {
namespace Client {

inline envoy::config::filter::network::redis_proxy::v2::RedisProxy::ConnPoolSettings
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this was not inline before, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is fine, or you can move the impl to a CC file in a follow up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was not- I inlined it as it was short (per the style guide this ok apparently), but it's an easy move if you guys prefer.

@HenryYYang
Copy link
Copy Markdown
Contributor

LGTM

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks!

@mattklein123 mattklein123 merged commit e8a98ac into envoyproxy:master Mar 8, 2019
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.

4 participants