Skip to content

grpc web library generation #6

@Pritesh-Patel

Description

@Pritesh-Patel

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions