Questions tagged [grpc-gateway]

68 questions
1
vote
1 answer

grpc-gateway : cannot find package "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"

I am trying to setup grpc gateway. Have tried all the steps mentioned at Github. The reverse proxy file is getting generated with the following "github.com/grpc-ecosystem/grpc-gateway/v2/runtime". But when I do go build it is giving me this error …
1
vote
1 answer

ingress does not work with GRPC gateway. HTTP requests are not being forwarded to GRPC gateway as expected by the ingress

I have set up a GRPC gateway with all the methods corresponding to HTTP URLs. e.g. v1/my-service. These paths do not seem to work for the ingress I have set up. I can send a request indirectly by using another pod to route the requests to this URL…
1
vote
2 answers

How to handle multiple endpoints via grpc-gateway?

I'm sure all the services are working properly. I have the code below: This snippet is used for registering two endpoints. func RegisterEndpoints(ctx context.Context, c *utils.AppConfig, r resolver.Builder) (http.Handler, error) { var err error …
Rex Tsao
  • 65
  • 1
  • 13
1
vote
2 answers

How to send metadata from grpc-gateway to go grpc server?

How can I send metadata from grpc-gateway to grpc server? On the client(grpc-gateway): func (c *Client) MiddlewareAuth(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx :=…
aleksl0l
  • 11
  • 1
  • 4
1
vote
1 answer

gRPC and Swagger annotation differences

I have a protocol buffer definition, which includes google.protobuf.Timestamp as part of a message. The Timestamp message is pretty simple and has the following definition: message Timestamp { int64 seconds = 1; int32 nanos = 2; } So the gRPC…
pinkstone
  • 111
  • 2
  • 10
0
votes
0 answers

What happen to Context Object in Go?

first I want to specify our architecture. Client -> Grpc Gateway -> Server In our architecture, we use a gateway to process and authenticate requests and then pass it to the Server application. in the Grpc Gateway, we use alice package to chain some…
0
votes
0 answers

Why `grpc-gateway` named as `gateway`?

Ok, everybody might thinks that's this is really really silly & stupid question, but the more I think about it (this is basically random though but kinda interesting) the more I realize that it's more keen to grpc-rest-proxy. Especially, if you look…
user555742
  • 68
  • 6
0
votes
0 answers

how to retrieve metadata set in filter in go-grpc

When set grpc filter func GetChainUnaryServerInterceptor() grpc.UnaryServerInterceptor { return grpc_middleware.ChainUnaryServer( grpc_auth.UnaryServerInterceptor(auth.CookieAuth), parseSessionToUidFilter, ) } func…
jay cole
  • 1
  • 1
0
votes
0 answers

How do I integrate a grpc gateway with new relic one?

I am not getting anything on web to how to integrate a grpc gateway with new relic in golang. I have used the nrgrpc package: https://pkg.go.dev/github.com/newrelic/go-agent/v3/integrations/nrgrpc
0
votes
0 answers

gRPC Gateway and protobuf protoreflect.ProtoMessage error

I'm working on migrating an older proto file that uses gRPC Gateway to protobuf apiv2. I'm able to generate the following files: api.pb.go, api_grpc.pb.go, and api.pg.gw.go however when attempting to build the project I get the missing ProtoReflect…
0
votes
1 answer

Is it possible to write a gRPC gateway in .Netcore for existing rest endpoints?

I have two microservices namely ProductService and BillingService. Both are written in .Net core web API project. 1. Product service has an endpoint like : httpget- v1/product/bed/b1 2. BillingService has an endpoint like: httpget -…
Sannn
  • 45
  • 7
0
votes
1 answer

What `bazel` dependency to be able to `import "protoc-gen-openapiv2/options/annotations.proto"`?

I'm trying to create Swagger documentation for proto files and would like to import "protoc-gen-openapiv2/options/annotations.proto"; to do so. What bazel dependency is needed to do this?
Noel Yap
  • 18,822
  • 21
  • 92
  • 144
0
votes
1 answer

How to download image via gRPC Gateway?

I want to serve files(images) via gRPC Gateway from gRPC server. Since protocol buffers messages have sctructure, I don't see how I could ensure the gateway to send content of the bytes field of the response message instead of the entire…
user17644273
0
votes
1 answer

HTTP2 PROTOCOL_ERROR while make request to a grpc-gateway server

So I have a grpc service in Golang, and I want to expose an HTTP API on top of it, so I added grpc-gateway to the service. When I try to make an HTTP request to my service it fails with a weird error 500 Internal Server Error caused by: stream…
Palash Nigam
  • 1,653
  • 3
  • 14
  • 26
0
votes
0 answers

connection refused error while registering grpc-gateway handler running on localhost

I am trying to add grpc-gateway to my grpc based service. Here is some code from my main.go file // NewGRPCServer method is an abstraction defined in my codebase // that essentially calls https://pkg.go.dev/google.golang.org/grpc#NewServer // and…
Palash Nigam
  • 1,653
  • 3
  • 14
  • 26