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

Open
wants to merge 1 commit into
base: emit-metrics-for-new-behavior-step-1
Choose a base branch
from

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 82.89474% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 85.30%. Comparing base (f7b3c8e) to head (1d693b7).

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.30%   -0.04%     
========================================================================
  Files                                       271      272       +1     
  Lines                                     15624    15632       +8     
========================================================================
+ Hits                                      13333    13335       +2     
- Misses                                     1872     1875       +3     
- Partials                                    419      422       +3     

☔ 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.

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.

None yet

2 participants