Add trailers metadata support in unary response methods #713
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.
Summary
This merge request introduces the capability for servers to send custom metadata (trailers) in responses for unaryToUnary and clientStreaming methods using the fs2.grpc library. Prior to this change, metadata was automatically filled with empty values, with no option for the server to specify or send custom metadata. This enhancement opens up the flexibility for server implementations to include additional information in their responses, providing a richer communication protocol between clients and servers.
Changes
In this Merge Request, the generation of additional traits and objects with the "Trailers" suffix is added, supporting GRPC trailers metadata. In the signature of the newly generated traits, two methods are modified: noStreaming and clientStreaming. This means that, in these two types of GRPC handlers, the server will be able to specify which metadata it wishes to return, and the client will be able to retrieve this metadata