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

postgres throws error: null value in column "id" violates not-null constraint even when value is actually not null

I am building a rest api using grpc,but even though i have value populated i get the above error. The curl Post gets redirected to createAlbum method i did create a db and table manually in postgres my db name is album I login using psql album(no…
0
votes
1 answer

How does communication between 2 microservices with grpc work?

Let's say you have an application like a bookstore, and you split it into two simple microservices in the backend -> Microservice 1: Book purchasers (with Accounts) Microservice 2: Book list. Let's say you make a request from the front end, goes…
TheRoadLessTaken
  • 531
  • 2
  • 7
  • 15
0
votes
1 answer

Does GRPC Middleware library support grpc-node?

Does GRPC Middleware library support grpc-node? I'm interested in logging grpc proto requests, and it seems like I might have to learn golang in order to have a logging feature?
TheRoadLessTaken
  • 531
  • 2
  • 7
  • 15
0
votes
1 answer

Concerns with gRPC architecture (gRPC, nginx, docker)

I'm currently trying to create a tracing tool for fun (which supports gRPC tracing) and was confused as to whether or not I was thinking about this architecture properly. A tracing tool keeps track of the entire workflow/journey of the request (from…
TheRoadLessTaken
  • 531
  • 2
  • 7
  • 15
0
votes
1 answer

How to stop golang gRPC server with a function?

Looking at the helloworld example from grpc-go, how can I add a StopGrpcServer() function to stop gRPC server? I'm trying to make a shared C library file of gRPC server which can be used to start and stop the gRPC server by invoking the functions…
satinder
  • 173
  • 3
  • 16
0
votes
1 answer

Const initializer 'protoimpl.EnforceVersion(20 - protoimpl.MinVersion)' is not a constant

I'm new to gRPC, trying to generate go code from protos and getting this error on the generated file Generated code with issue: // protoc-gen-go v1.25.0 // protoc v3.12.3 const ( // Verify that this generated code is sufficiently…
aclowkay
  • 3,577
  • 5
  • 35
  • 66
0
votes
1 answer

How to generate TLS certificate bound gRPC server with protoc

Using protoc, in golang in my case, the generated server files are not bound to a TLS certificate and key that I have created. In fact I had to instantiate the grpc server using this approach: creds, _ :=…
gextra
  • 8,439
  • 8
  • 40
  • 62
0
votes
1 answer

go grpc load balancing by sharding

Is it possible to implement gRPC client sharding on balancer level? Let's say I want to shard my requests to service foosvc, which I name resolve beforehand to 3 servers (foosvc1, foosvc2, foosvc3) and I want client1 to always connect to server…
sveatlo
  • 543
  • 9
  • 27
0
votes
2 answers

Grpc Writing Interceptors for Specific Endpoint

I implemented a grpc server in Golang. This server has multiple endpoints, but for one of the endpoints I want to implement an interceptor that will check the validity of an authentication token before proceeding with the request. I know how to…
MUAS
  • 519
  • 1
  • 7
  • 20
0
votes
1 answer

Proto mismatch in GRPC client server architecture in golang

I have one proto file in client and one in server, but the field numbers in client protobuf for a particular attribute has to be same in server proto. message Foo_client { string foo_has = 1; string bar_has = 3; } message Foo_server { …
0
votes
2 answers

What happens when grpc server calls Send repeatedly but grpc client never calls Recv?

I have a grpc client application that might block from time to time which results in a situation where it would be unable to call the grpc Recv function for a while. What is the behavior seen on the grpc server in this situation? Does the grpc…
0
votes
2 answers

How to safely add values to grpc ServerStream in interceptor

I have a logging interceptor for my grpc server and want to add a value to the metadata (I want to track the request throughout its lifetime): func (m *middleware) loggingInterceptor(srv interface{}, ss grpc.ServerStream, info…
Kelly Flet
  • 514
  • 2
  • 5
  • 23
0
votes
2 answers

proto3 message type for json marshal data

I am implementing a gRPC API and wanted to add JSON body data as it is in response. so I have tried: type Message struct { Subject string `json:"subject"` Body interface{} `json:"body"` } proto3 message Message { string subject =…
Vivek Singh
  • 625
  • 8
  • 15
0
votes
1 answer

Kubemq-go missing tags in response to query via GRPC

I am developing a microservices interacting via kubemq in cluster. When sending query response (via GRPC protocol) with some tags attached: err := client.NewResponse(). SetRequestId(query.Id). …
0
votes
1 answer

Go based grpc server stream keeps stacking up the response to go client

Sorry if this is a noob question, i'm new to grpc's server side streaming. What I have right now in a function on server that streams to client req, err := http.NewRequest("GET", actualURL, nil) //skipping some lines// res, _ :=…
sup
  • 105
  • 1
  • 4
  • 17