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

Add an HTTP wrapper to the gRPC daemon #899

Merged
merged 6 commits into from
Jul 19, 2022

Conversation

tomelm
Copy link
Contributor

@tomelm tomelm commented Jun 21, 2022

Reviewers

r? @vcheung-stripe @suz-stripe
cc @stripe/developer-products

Summary

I was working on a small side projects where I was trying to have an app talk to the Stripe CLI's gRPC interface. One problem I had is that the request client only supported HTTP which meant that it couldn't interface with the daemon directly. This PR wraps the gRPC daemon and spins up another server that supports all the gRPC functionality as an HTTP server.

Copy link
Contributor

@ianjabour-stripe ianjabour-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, will defer to @vcheung-stripe being that he's got more context on the gRPC setup.

Copy link
Collaborator

@vcheung-stripe vcheung-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

pkg/rpcservice/middleware.go Outdated Show resolved Hide resolved
@tomer-stripe tomer-stripe merged commit 9c5f16d into stripe:master Jul 19, 2022
tomer-stripe added a commit that referenced this pull request Jul 19, 2022
tomer-stripe added a commit that referenced this pull request Jul 19, 2022
tomer-stripe added a commit that referenced this pull request Jul 19, 2022
* The daemon can spin up an http grpc server in parallel for web clients

* Go back to the non-hardcoded ip

* Add comment for exported server function

* Return the right header in the required header check for the daemon

* When the request errors, mention both headers otherwise the logic gets weird

* Remove extra newline

Co-authored-by: Tomer Elmalem <[email protected]>
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

Successfully merging this pull request may close these issues.

5 participants