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
1 answer
Behavior of server.GracefulStop() in golang
I have a gRPC server, and I have implemented graceful shutdown of my gRPC server something like this
fun main() {
//Some code
term := make(chan os.Signal)
go func() {
if err := grpcServer.Serve(lis); err != nil {
…

uzumas
- 632
- 1
- 8
- 23
-1
votes
1 answer
Getting undefined: SayHelloServerStreaming error while running the main file of the client side
I am relatively new in GRPC and unable to solve this issue. Could anyone please suggest what is the problem in the client side function due to which it has been showing undefined after running go run main.go for the client side file
greet.proto…

Sunny Yadav
- 99
- 5
-1
votes
1 answer
How to write a integration testing for grpc micro services in golang?
I have a 3 grpc microservices r1, r2, r3 where r1 connect to r2 and r2 connect to r3 for response. All the 3 microservices are entirely different project and running on different port 8001, 8002, 8003. How can I write integration test where I can…
-1
votes
1 answer
How to call a gRPC function which return empty
Here is the defination of the function at the file ns.pb.go
CreateMACCommandQueueItem(ctx context.Context, in *CreateMACCommandQueueItemRequest, opts ...grpc.CallOption) (*empty.Empty, error)
Here is the part of main.go code that I write:
resp, err…
-2
votes
1 answer
How to disable `err != nil` check in autogenerated gRPC client functions
I have a protobuf definition of an interface. I autogenerate client functions for that interface using protoc --go_out=... --go-grpc_out=... file.proto.
The autogenerated functions all have this code snippet:
if err != nil {
return nil,…

selamba
- 384
- 4
- 12
-2
votes
1 answer
Why can't I start two servers in the same Go project?
I am a new Go developer and I am trying to build a single project that has both a gRPC server and a Gin HTTP server. This is what my code roughly looks like:
package main
import (
"log"
"net"
"github.com/gin-gonic/gin"
…

JackH
- 4,613
- 4
- 36
- 61
-2
votes
1 answer
running into invalid memory address when attempting to assign values in golang to a slice of type pointer
I'm bit lost with this panic when writing gRPC server in Go
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005…

sup
- 105
- 1
- 4
- 17
-3
votes
1 answer
Relative import in Go for protobuf , cannot find module path
I'm trying to write a service in go with gRPC, and when i import the protobuff file , getting an error. i tried removing all the modules in my go path and reinitialising the go modules
build _/Users/tibinlukose/cart-service/pb: cannot find module…

Tibin
- 612
- 1
- 8
- 21
-4
votes
1 answer
Go build command throws - panic: interface conversion: interface {} is []uint8, not *validator.FieldValidator
In below Go function I am getting error when I tried to run build command to generate pb.go file.
panic: interface conversion: interface {} is []uint8, not…

Maana
- 640
- 3
- 9
- 22
-4
votes
1 answer
Create function that receives any function with specific amount of parameters
Say I have several different gRPC servers, for example x.Server, y.Server and z.Server, and in order to spin them up, I have a lot of repeated code inside their main function, e.g.:
func main() {
if err := config.EnsureArgLength(1); err != nil…

André Winston
- 167
- 5