-
Notifications
You must be signed in to change notification settings - Fork 42k
Use narrowly scoped interfaces for client access #6871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use narrowly scoped interfaces for client access #6871
Conversation
Use custom narrowly scoped interfaces for client access from the RollingUpdater and Resizer. This allows for more flexible downstream integration and unit testing without imposing a burden to implement the entire client.Interface for just a handful of methods.
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR I think this is a pattern we should apply more.
Edit: specifically defining local-ish interfaces that implement JUST what we need in the local module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, let's drop the hammer on anyone who even looks at *client.Client funny
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔨
|
@thockin @pmorie @smarterclayton bd7b719 introduces some constructors which allow us to keep the |
|
I see how it works. You drive-by some comments and BAM, you get assigned the code review. That'll teach me. LGTM |
Use narrowly scoped interfaces for client access
|
You must be new here.
|
Use custom narrowly scoped interfaces for client access from the
RollingUpdater and Resizer. This allows for more flexible downstream
integration and unit testing without imposing a burden to implement
the entire client.Interface for just a handful of methods.