Open timostamm opened 10 months ago
@timostamm, FYI, there is also another example in the Go docs for the vanguardgrpc
sub-package (link). That looks like kind of like what is suggested -- it is similar to the connect-grpc example folder but uses the library service.
Perhaps the main thing needed is an obvious pointer from the main vanguard
package docs to the vanguardgrpc
package, so users find it more easily and can then discover that example?
Yes, I think this is a great example, see second paragraph. It requires the generated code, so it's not straight-forward to run it.
This is a wonderfully flexible library, but we've heard in the Buf Slack channel that some users have had issues to get started with the simple use case of exposing an existing grpc-go service via vanguard-go.
The Go doc has an example for adding REST support to a connect-go service here. It's a great example, but it's a bit difficult for users to extract the relevant code and adapt it to their project because it's a Go doc example.
This project also has three runnable examples that are easy to get started with. Unfortunately, they don't let the user modify a Protobuf file and see how a REST annotation works out. Perhaps the connect-grpc example could be replaced with an implementation that uses library.proto, so that it showcases the REST translation. The README could have links or cURL commands for users to try it out.