Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide easy-to-follow example for the most common use case #112

Open
timostamm opened this issue Jan 2, 2024 · 2 comments
Open

Provide easy-to-follow example for the most common use case #112

timostamm opened this issue Jan 2, 2024 · 2 comments

Comments

@timostamm
Copy link
Member

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.

@jhump
Copy link
Member

jhump commented Jan 5, 2024

@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?

@timostamm
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants