yarpc / yarpc-go

A message passing platform for Go
MIT License
401 stars 101 forks source link

yarpcconfig: expose outbound name in kit #2171

Closed jronak closed 1 year ago

jronak commented 1 year ago

Transport outbound builders do not have access to the name of the outbound service. Unary, oneway and stream outbound builders have function signatures like:

func buildOutbound(outboundConfig *OutboundConfig, tr transport.Transport, kit *yarpcconfig.Kit) (*Outbound, error)

None of the above params contain outbound service name.

This pull request adds the name of the outbound service in yarpcconfig.Kit while building outbound, which can be accessed by the outbound builders.

For reviewers, start with yarpcconfig/kit.go then go to yarpcconfig/builder.go

codecov[bot] commented 1 year ago

Codecov Report

Base: 85.15% // Head: 85.16% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (f881443) compared to base (20e3982). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2171 +/- ## ======================================= Coverage 85.15% 85.16% ======================================= Files 268 268 Lines 15244 15250 +6 ======================================= + Hits 12981 12987 +6 Misses 1842 1842 Partials 421 421 ``` | [Impacted Files](https://codecov.io/gh/yarpc/yarpc-go/pull/2171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc) | Coverage Δ | | |---|---|---| | [yarpcconfig/builder.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2171/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-eWFycGNjb25maWcvYnVpbGRlci5nbw==) | `98.77% <100.00%> (+<0.01%)` | :arrow_up: | | [yarpcconfig/kit.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2171/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-eWFycGNjb25maWcva2l0Lmdv) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.