Questions tagged [grpc-go]

The Go implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.

385 questions
5
votes
2 answers

How do I respond to multiple gRPC clients?

I am building an application which can have multiple gRPC servers and definitely will have multiple gRPC clients, I wanted to know, how to identify on server side that this is the client I am talking to and only send data to that client. I am using…
iamalsaher
  • 63
  • 1
  • 7
5
votes
1 answer

web gRPC with TLS on localhost

I have a Go server and client using a local trusted certificate and they communicate flawless with each other. Now I want the Go server to communicate with a web-grpc instance too. Insecure didn't work as browsers force HTTP2 to go over TLS or deny…
user6834400
5
votes
1 answer

How do I debug gRPC-Go services?

Using gRPC-Go is certainly a good way to build resilient, performant and scalable distributed systems. What I don't quite get is how to actually debug services written with it. Also, is HTTP/2 the only wire protocol supported?
Michael Hausenblas
  • 13,162
  • 4
  • 52
  • 66
4
votes
1 answer

Modifying metadata on Go GRPC server streaming interceptor

I've been trying to set metadata on a server stream interceptor so they could be read downstream by the actual RPC function: func UserIDInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error…
Woody1193
  • 7,252
  • 5
  • 40
  • 90
4
votes
1 answer

Import multiple protobuf files with common message names in a single proto file

I have several protobuf files that share some message names and for this reason I cannot have all the generated go files in one folder as I run into issues like "..re-declared in this block". I attached a minimal go project how to reproduce this…
Andrei
  • 7,509
  • 7
  • 32
  • 63
4
votes
1 answer

Go WebAssembly with gRPC Web

I want to make a website using webassembly written mainly in go, and I would like to use grpc protocol, due the web restrictions, I have to use the "web version protocol" of grpc, and it can be compiled to js library, and how can I compile the "web…
4
votes
1 answer

How to get a Protobuf enum value from its string representation?

I can get the string value of a Protobuf enum with this instruction: str := testPB.Status_ENABLED.String() How can I perform the inverse operation? (from a string, get the enum element).
user1275011
  • 1,552
  • 1
  • 16
  • 36
4
votes
2 answers

How to connect to the gRPC service inside k8s cluster from outside gRPC client

I have a gRPC server running on port 9000 with gRPC-gateway running on port 9080. I can make request to my service with postman using the following link: ```http://cluster1.example.com/api/v1/namespaces/default/services/my-service:9080/proxy How can…
Klimbo
  • 1,308
  • 3
  • 15
  • 34
4
votes
1 answer

How to use protocol buffer FieldMask in Go

Python Generated Code lists Well Known Types, but there is no equivalent in Go Generated Code. I assume if there was, it would document this package google.golang.org/protobuf/types/known. Specifically, I was looking for documentation on FieldMask.…
Jack
  • 10,313
  • 15
  • 75
  • 118
4
votes
3 answers

What is the difference between grpc-gateway vs Twirp RPC

We already have the Twrip-RPC which provides rpc and rest endpoints . then why we need the grpc-Gateway . What advantages it's providing compared to twirp. Is it like we can provide custom endpoints with grpc gateway is that the only difference.…
user1844634
  • 1,221
  • 2
  • 17
  • 35
4
votes
1 answer

How to send google.protobuf.Struct data in a GoLang test case?

I'm writing my first API endpoint in GoLang using GRPC/proto-buffers. I'm rather new to GoLang. Below is the file I'm writing for my test case(s) package my_package import ( "context" "testing" "github.com/stretchr/testify/require" …
Saqib Ali
  • 11,931
  • 41
  • 133
  • 272
4
votes
1 answer

golang grpc transport.newBufWriter and bufio.NewReaderSize not releasing memory

I have a simple grpc server in golang which does CRUD operations on an object. However, when I run it the memory never goes down even after requests stop. pprof of heap show has the following result: > flat flat% sum% cum cum% > …
Anshul Prakash
  • 301
  • 2
  • 15
4
votes
0 answers

Docker Build Failing google.golang.org/api/option

In my docker file , I have following Lines RUN go get -v -u go.mongodb.org/mongo-driver/mongo RUN go get -d -v ./... RUN go get google.golang.org/api/option I am getting following error . Everything was working fine 3 days before. Step 9/17 :…
max
  • 1,505
  • 3
  • 15
  • 38
4
votes
2 answers

improbable-eng/grpc-web Response closed without headers

I have a server in go using gRPC and on the react client I'm using grpc web with grpcwebproxy and I've been trying to connect my client to the server but constantly get error Code 2, with the message: Response closed without headers. Has anybody…
kpuno
  • 41
  • 1
  • 4
4
votes
1 answer

Getting 405 http error in Client to call gRPC Web

I am getting http error code 405 while calling the gRPC service from rest client. I tried calling the delete method using the gRPC client, it is working fine (i.e. getting 200). REST CLIENT req, err = http.NewRequest("DELETE", fmt.Sprintf("%s%s",…
1 2
3
25 26