Method type specific MethodDescriptor wrapper
- Vorherrschende Sprache
- Java
- Sterne
- 12.1k
- Forks
- 4k
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 37
Beschreibung
### Is your feature request related to a problem? Please describe.
It would be great if MethodDescriptors would be wrapped in method type specific class/interface, similar to RequestMethods. It would enable gRPC tooling to know what type of method it is at compile type, so it would be possible to return appropriate action interfaces based on the method type (does method have single/multiple request/responses). This would help to reduce the tools API verbosity and a bit of complexity.
### Describe alternatives you've considered
Current approach is to have differently named methods (unaryMethod(), serverStreamingMethod(), ...) and check if appropriate method type is passed at runtime.
### Additional context
I'm trying to create a gRPC method mocking tool for easier testing - [gRPCMock](https://github.com/Fadelis/grpcmock/). This feature would help determining what type of stub needs to be returned and have single name method for all types.
Beitragsleitfaden
Rechercherichtung
Start by reviewing the existing MethodDescriptor and RequestMethods APIs, then trace how method types are currently distinguished by the grpc-java tooling. Define the scope of method-specific wrappers and the compile-time behavior they should provide; done means the API supports the four request/response method shapes without relying on runtime checks.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- grpc, java
- Bereich
- api, developer-experience
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100