The Go implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.
Questions tagged [grpc-go]
385 questions
0
votes
0 answers
Golang grpc Server blocks memory
we are using golang 1.16. for developing a microservice which exports product data to shopify. the microservice is starting a grpcserver. our java client starts the export of the items via calling the endpoint "SendAllItems" on grpc Server. then the…

Stefan Kahr
- 21
- 2
0
votes
0 answers
What is the correct approach to persist protobuf messages
Let's say I have a simple bookstore CRUD api with gRPC. It consists of a book protobuf message
message Book {
string id = 1;
string title = 2;
Author author = 3;
}
message Author {
string name = 1;
}
I want to persist the books in a…

ptwo
- 461
- 4
- 13
0
votes
1 answer
Basic changes to Hello World GRPC
I am using gRPC with Golang.
After successfully running their HelloWorld tutorial which required me to add a second function, compile the protoc file, I decided to make some further changes.
My code is included, which appears not to work because it…
user15148251
0
votes
0 answers
Can I reuse an empty or static GRPC response?
When using the Go implementation of GRPC, what is considered best practice in regards to reusing or sharing empty or unchanging responses between multiple requests? This saves an unnecessary allocation - but is there any reason not to?
For…

Phillip Elm
- 2,094
- 2
- 16
- 27
0
votes
1 answer
How to set header response in grpc java server
@Override
public void getResult(Request request, StreamObserver responseObserver) {
responseObserver.onNext(new Respons("check"));
responseObserver.onCompleted();
}
how to send header response?
In golang I can send…

Vishal Neekhra
- 33
- 1
- 8
0
votes
1 answer
Grpc Go Generated.pb.go import was not formatted
I imported proto file (validator.proto) from one of my project https://github.com/maanasasubrahmanyam-sd/customValidation to another project (test.proto) https://github.com/maanasasubrahmanyam-sd/customeValTest/tree/master/interfaces/test_server
go…

Maana
- 640
- 3
- 9
- 22
0
votes
1 answer
Go proto: File not found
I have been trying to run below command
protoc -I ./interfaces/ -I ${GOPATH}/pkg/mod/github.com/envoyproxy/protoc-gen-validate@v0.1.0 -I ${GOPATH}/pkg/mod/github.com/gogo/protobuf@v1.3.2 -I ${GOPATH}pkg/mod/github.com/x --gogo_out=.…

Maana
- 640
- 3
- 9
- 22
0
votes
2 answers
Time datatype mismatch between Golang cloudEvent and proto
I am creating a proto file (and following cloudEvents standards).
syntax = "proto3";
option go_package = "/events";
import "google/protobuf/timestamp.proto";
import "google/protobuf/any.proto";
message Event {
string specversion = 2;
…

Pragmatic
- 3,093
- 4
- 33
- 62
0
votes
1 answer
Grpc Golang using UnimplementedServer with other embedded interfaces
I've recently updated to the latest protoc and Go plugins with an existing proto 3 codebase, and am running into trouble with the new UnimplementedServer functionality. The struct that is used for the Grpc server already embeds another interface…

Jeffe
- 31
- 4
0
votes
1 answer
Proxying GRPC requests on different hosts
We implemented GRPC API using golang, and now need some mechanism to route requests on two different hosts (prod/stage). The problem is the routing rule must be depended on grpc metadata, not the header. Actually we pass iOS version at metadata…

James May
- 1,371
- 3
- 20
- 37
0
votes
1 answer
Long-lasting grpc streaming RPC and backoff strategy
I have implemented a subscribe pattern RPC with gRPC (
rpc SubscribeX(SubscribeXRequest) returns (stream X)
) using grpc-go. In the client, I want to resubscribe if there is a problem with the connection. I'm not sure if I should use their…

Reza Mohammadi
- 645
- 5
- 13
0
votes
0 answers
Mocking `peer` while unit testing gRPC with bufconn
I have unidirectional (both client- and server-) streaming gRPC methods implemented in my golang server. I came across bufconn which enables me to creates my server via in-memory connections in my tests. However, I have logic in my method where I…

Bak
- 3
- 3
0
votes
1 answer
not receiving error from remote call, goes all the way to timeout Go gRPC + micro + protobuf
I've recently started learning microservices using Go and I've stumbled upon some tutorial that was using micro, gRPC and protobuf. After some time I realized that I do not receive any error messages from the cli that was created to communicate with…

dbielecki97
- 1
- 1
0
votes
1 answer
go-grpc Import "google/protobuf/struct.proto" was not found or had errors
I'm using following command to generate proto code for golang:
protoc --go_out=../generated --go_opt=paths=source_relative \
--go-grpc_out=../generated --go-grpc_opt=paths=source_relative \
*.proto
I'm using in-built…

SaiNageswar S
- 1,203
- 13
- 22
0
votes
1 answer
gRPC Unimplemented/Unknown Service
I'm working on a project using gRPC and have recently migrated it to have each service running in Docker containers (it might be worth adding that I am fairly new to containerisation). Today, while moving one of my Go services into a container I ran…

Nicholas Bunn
- 21
- 1
- 2