question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add gRPC metadata example

See original GitHub issue

I’m submitting a…


[ ] Regression 
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request (new chapter/page)
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Expected behavior

As a user, I would like to see passing gRPC metadata example

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


For Tooling issues:
- Node version: XX  
- Platform:  

Others:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kerf007commented, Jun 25, 2020

I have similar issue. I’m as grpc client have to add jwt token to each request to grpc server and I don’t understand how to do it. Help please 😃

1reaction
kwado-techcommented, Jan 22, 2022

This doc illustrates the use of ts-proto package to generate ts files from .proto schemas.

here is an example script to generate for user.proto schema

# nestJs - /gen-nestjs-proto.sh
generate_nestjs_proto_definitions() {
    # remove directory if exists
    rm -r ./src/proto/nestjs

    # make directory
    mkdir ./src/proto/nestjs

    # generate definitions
    protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=addGrpcMetadata=true --ts_proto_opt=nestJs=true --ts_proto_out=./src/proto/nestjs ./src/proto/user.proto
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

grpc-go/grpc-metadata.md at master - GitHub
Metadata. gRPC supports sending metadata between client and server. This doc shows how to send and receive metadata in gRPC-go.
Read more >
Metadata Example - Google Git
This example shows you how to add custom headers on the client and server and how to access them. Custom metadata must follow...
Read more >
gRPC - Send/Receive Metadata - Tutorialspoint
gRPC supports sending metadata. The metadata is basically a set of data we want to send that is not part of the business...
Read more >
gRPC metadata for Client / Server context | by Harlow - Medium
When we need to pass metadata between services the gRPC metadata package can be used pass key-value pairs in the context.
Read more >
io.grpc.Metadata.put java code examples - Tabnine
Returns the last metadata entry added with the name 'name' parsed as T. containsKey. Returns true if a value is defined for the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found