fix(transport/grpc): add client option to disable prefix#523
fix(transport/grpc): add client option to disable prefix#523terinjokes wants to merge 1 commit intogo-kit:masterfrom
Conversation
Add a ClientOption to revert the auto-prefixing of "pb" to service names when there's no other prefix already specified. Relates to go-kit#447.
|
Hi @terinjokes thanks for this. Contrary to what we discussed earlier I'm leaning towards biting the bullet and removing the auto prefixing of We postponed Go kit v1.0.0 and are still in 0.x.x so have no hard API stability guarantees yet. Changing existing gRPC clients which break due to this should be easy. @peterbourgon what do you think? |
|
No objections to breaking the API. I don't have sufficient context to have an opinion on the prefixing or not; I defer to your judgment there. |
|
Presumably people are vendoring and they can fix the prefixes on their own schedule. @basvanbeek If you give me a bit to finishing waking up and starting to work, I don't mind sending a PR to remove it. |
|
@basvanbeek I opened alternative CL #524 |
|
closed in favor of #524 |
Add a ClientOption to revert the auto-prefixing of "pb" to service names
when there's no other prefix already specified.
Relates to #447.
This implementation touches the fewest lines of code, at the expense at perhaps being a bit more complex. An alternative implementation I have in mind avoids the
fmt.Sprintfon line 45 to construct the method, stores them separately, until the method is actually needed toInvoke. TheClientOptioncould then just set a flag to turn off the prefixing.What do you think?
Additionally, is there something I can do to denote that auto-prefixing is deprecated, so we can re-evaluate this in a future breaking change?