Refactor http, grpc senders and promote to public API #7782
+1,552
−1,564
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #6718.
Sketching out all the changes I think would be required to promote the HttpSender, GrpcSender interfaces to the public API. There's a lot. Summary:
Marshalerand related APIs, since they balloon the API surface area and would take lot of work to get ready for public. Introducing narrow focusedGrpcMessageWriter,HttpRequestBodyWriterto serve the function currently performed byMarshaler.MarshalerServiceStuband related APIs from the gRPC senders stuff. It drags in a bunch of unnecessary cruft andio.grpc.stubdependency.HttpSenderConfig#getExportAsJson()option. Senders don't need to be burdened with understanding whether the request is binary or JSON. They just need to be told the content type and a way to write the request body.Compressorand related APIs need to get promoted as well.GrpcSenderConfig,HttpSenderConfigObject GrpcSenderConfig#getManagedChannel(), which is required for backwards compatibility and forUpstreamGrpcSender, behind an internal-onlyExtendedGrpcSenderConfigLeaving as a draft because: