Skip to content
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

[1/2 tchannel refactoring] Extracted response writer to dedicated file. #2273

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

biosvs
Copy link
Collaborator

@biosvs biosvs commented May 7, 2024

Extracted response writer to dedicated file, introduced constructor type and simplified interface.

This PR is part of header handling changes (#2265). This refactoring was extracted from tchannel PR to make review easier.

Copy link

codecov bot commented May 7, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 13 lines in your changes missing coverage. Please review.

Project coverage is 85.31%. Comparing base (f7b3c8e) to head (ba0c943).

Files Patch % Lines
transport/tchannel/response_writer.go 78.68% 7 Missing and 6 partials ⚠️
Additional details and impacted files
@@                           Coverage Diff                            @@
##           emit-metrics-for-new-behavior-step-1    #2273      +/-   ##
========================================================================
- Coverage                                 85.33%   85.31%   -0.02%     
========================================================================
  Files                                       271      272       +1     
  Lines                                     15624    15630       +6     
========================================================================
+ Hits                                      13333    13335       +2     
- Misses                                     1872     1874       +2     
- Partials                                    419      421       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

AddHeader(key string, value string)
transport.ResponseWriter

AddSystemHeader(key string, value string)
Copy link
Collaborator

Choose a reason for hiding this comment

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

optional: do you want to use AddTransportHeader instead, as usually we differentiate between transport header and application header. System sounds quite general.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

AddSystemHeader is used in grpc, so I decided to make it consistent at first step (: Maybe we'll return to this and change to AddTransportHeader in a future refactoring, as it makes sense to me.

@biosvs biosvs merged commit d8e451e into emit-metrics-for-new-behavior-step-1 Jul 30, 2024
16 checks passed
@biosvs biosvs deleted the tchannel-refactoring-1 branch July 30, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants