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

grpc web library generation #6

Closed
Pritesh-Patel opened this issue Sep 25, 2019 · 1 comment
Closed

grpc web library generation #6

Pritesh-Patel opened this issue Sep 25, 2019 · 1 comment
Assignees
Projects

Comments

@Pritesh-Patel
Copy link
Contributor

Pritesh-Patel commented Sep 25, 2019

Generate grpc-web artifacts for the frontend to consume - the proxy can be added at a later stage

What options do we need to support?

These are from the grpc-web repo:

Import Style
import_style=closure: The default generated code has Closure goog.require() import style.

import_style=commonjs: The CommonJS style require() is also supported.

import_style=commonjs+dts: (Experimental) In addition to above, a .d.ts typings file will also be generated for the protobuf messages and service stub.

import_style=typescript: (Experimental) The service stub will be generated in TypeScript.

Note: commonjs+dts and typescript only works with --grpc-web_out= import style.

Wire Format Mode
For more information about the gRPC-Web wire format, please see the specification here.

mode=grpcwebtext: The default generated code sends the payload in the grpc-web-text format.

Content-type: application/grpc-web-text
Payload are base64-encoded.
Both unary and server streaming calls are supported.
mode=grpcweb: A binary protobuf format is also supported.

Content-type: application/grpc-web+proto
Payload are in the binary protobuf format.
Only unary calls are supported for now.

@Pritesh-Patel Pritesh-Patel self-assigned this Sep 25, 2019
@Pritesh-Patel Pritesh-Patel added this to In Code Review in sprout v0 Oct 1, 2019
@Pritesh-Patel Pritesh-Patel moved this from In Code Review to Done in sprout v0 Oct 1, 2019
@Pritesh-Patel Pritesh-Patel moved this from Done to In Code Review in sprout v0 Oct 1, 2019
Pritesh-Patel added a commit that referenced this issue Oct 2, 2019
#6 add grpc-web typescript generation support
@Pritesh-Patel Pritesh-Patel moved this from In Code Review to Done in sprout v0 Oct 2, 2019
@Pritesh-Patel
Copy link
Contributor Author

closed with #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
sprout v0
  
Done
Development

No branches or pull requests

1 participant