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
0
votes
1 answer

How GRPC handle pointer that appear more then once?

For example (golang): type { Product struct { Name string } Customer struct { Name string Products []*Product } } Which is the correct behavior: GRPC honor the *Product pointer and transfer it only once. GRPC will transfer the…
michaelbn
  • 7,393
  • 3
  • 33
  • 46
0
votes
1 answer

gRPC-go server becomes unresponsive and starts backing up requests after some time

We have a public gRPC API. We have a client that is consuming our API based on the REST paradigm of creating a connection (channel) for every request. We suspect that they are not closing this channel once the request has been made. On the server…
PassKit
  • 12,231
  • 5
  • 57
  • 75
0
votes
1 answer

google.golang.org/grpc not getting installed propely, PeerCertificates[0].URIs undefined (type *x509.Certificate has no field or method URIs)

my go version is "go version go1.9.4 linux/amd64" On running "go get -u google.golang.org/grpc", a "go" drectory gets created in my HOME and i get the following…
0
votes
0 answers

How can I send traces directly to webservice without using opentelemtry collector using oltp exporter in http protocol?

I am trying to send 2 different microservice data to my web service using open telemetry-javaagent ,one with jaeger exporter and the other with otlp, it looks like all the traces of jaeger are sent successfully and otlp are dropped as my web service…
0
votes
1 answer

Authorization annotations in Go GRPC

I have a GRPC server with APIs that are authorized like: func (s *MyServer) MyAPI(ctx context.Context, req MyAPIRequest) (MyAPIResponse, error) { isAuthorized, err = s.IsAuthorized(ctx, req.UserId, Role.User) // other APIs may use a different…
onepiece
  • 3,279
  • 8
  • 44
  • 63
0
votes
0 answers

client streaming protocol violation while creating grpc server stream endpoint in go

I am trying to create a grpc server streaming endpoint. Here is my protobuf file syntax = "proto3"; option go_package = "mirror_streampb"; option java_package = "com.mirror_stream"; option java_outer_classname = "StreamIdsProto"; option…
HDS
  • 13
  • 4
0
votes
1 answer

gRPC client-side load-balancing

I have a headless service running with multiple replicas. When trying to verify client-side load balancing using round robin I see that all requests end up in the same replica. Client setup looks like following: conn, err := grpc.Dial( …
0
votes
1 answer

How to implement Google Protobuf containing map with custom key

I want to create a protobuf which returns a map containing custom keys. When I try to make one, I get an error: Key in map fields cannot be float/double, bytes or message types. I want to know if there is a workaround for it. I am trying to create a…
Coder
  • 1,415
  • 2
  • 23
  • 49
0
votes
1 answer

Go GRPC client disconnect terminates Go server

Bit of a newb to both Go and GRPC, so bear with me. Using go version go1.14.4 windows/amd64, proto3, and latest grpc (1.31 i think). I'm trying to set up a bidi streaming connection that will likely be open for longer periods of time. Everything…
JBT
  • 1
  • 1
  • 2
0
votes
1 answer

GRPC not setting some headers

I have this code to disable client caching for a GET API: headers := metadata.Pairs( "Cache-Control", "no-cache, no-store, must-revalidate", "Pragma", "no-cache", "Expires", "0", ) err := grpc.SetHeader(ctx, headers) When I curl -i the…
onepiece
  • 3,279
  • 8
  • 44
  • 63
0
votes
1 answer

How can I unpack the grpc status.details error in golang?

I would like to use the google.golang.org/grpc/status error model for my REST APIs as it says you can: The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. But I am…
user3137124
  • 515
  • 1
  • 7
  • 13
0
votes
0 answers

Flutter gRPC: Best approach for two-way TLS in android app

I am building an android app using flutter. The backend service is built using golang with gRPC as the API. I want to achieve two-way TLS encryption for the app I am building. I have generated an RSA public and private key pair and assigned the…
hhharsha36
  • 3,089
  • 2
  • 12
  • 12
0
votes
0 answers

grpc-java define service and methods without proto file

In my grpc application, I need to have a service that has just two client-side streaming methods. Is it possible to define the service, messages without creating a .proto file in grpc-java?. If yes, can you point me to an example or tutorial.
saikamesh
  • 4,569
  • 11
  • 53
  • 93
0
votes
3 answers

How to make work protoc in go without copy the google files?

I'm trying to use https://github.com/grpc-ecosystem/grpc-gateway but when I try to run protoc -I/usr/local/include -I. -I${GOPATH}/src -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis…
delfosk9
  • 73
  • 1
  • 9
0
votes
1 answer

Using gRPC/protobuf with a go multirepo and go modules

I'm trying to get protoc and protoc-gen-go to play nice in a multi-repo codebase using go modules. I've managed to get things more or less working, until I introduced a major version bump in one of my "api" (i.e. protobuf) repos, and I've hit a bit…
Kris Pruden
  • 3,280
  • 4
  • 25
  • 30