-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
chore(architecture): Remove resolver from context #4752
Conversation
Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
Removing the Resolver made it superfluous Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
src/sinks/aws_cloudwatch_logs/mod.rs
Outdated
@@ -187,7 +187,7 @@ impl SinkConfig for CloudwatchLogsSinkConfig { | |||
let log_group = self.group_name.clone(); | |||
let log_stream = self.stream_name.clone(); | |||
|
|||
let client = self.create_client(cx.resolver())?; | |||
let client = self.create_client(dns::Resolver)?; |
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.
It doesn't need to happen as part of this PR, but it'd be nice to keep pushing this down to the point where it's actually used and get rid of the readability overhead of the threading entirely.
To where it is used Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@lukesteensen I pushed it all the way down in the last commit if you want to take a peek 👀 |
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.
Nice!
Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
* Remove Resolver from SinkContext Signed-off-by: Jesse Szwedko <jesse@szwedko.me> * Remove TransformContext Removing the Resolver made it superfluous Signed-off-by: Jesse Szwedko <jesse@szwedko.me> * Push dns::Resolver further down the stack To where it is used Signed-off-by: Jesse Szwedko <jesse@szwedko.me> Signed-off-by: Brian Menges <brian.menges@anaplan.com>
Fixes #4749
Conversation: #4685
This removes injection of the
Resolver
type viaTransformContext
andSinkContext
. As this was the only field forTransformContext
, I dropped that type.