Comments (2)
What you're suggesting is the only way I know of to pass extra information from gRPC handlers into HTTP middleware. I don't think this is too rare of a use case (e.g., setting cookies from gRPC handlers) so I'd be interested in exploring the solution space, if you're interested in working on it.
from grpc-gateway.
I'm trying to achieve something similar, I think it would be beneficial to have something like a functional interface for wrapping mux.Handle
and mux.HandlePath
, alternatively it would be also possible for the generated code to contain some capability of wrapping the call to mux.Handle there.
I'm trying to add support in go-http-metrics for the runtime mux, and although I can do this easily for custom methods, there are no viable alternatives of conciliating these two libraries. In my case if I went for a solution close to what @LazarenkoA has done here, it would be senseless to use go-http-metrics.
from grpc-gateway.
Related Issues (20)
- multi-folder not generating correct swagger file HOT 2
- [protoc-gen-openapiv2] Option to disable setting default values for enums without omitting it from the list of values HOT 3
- openapiv2_tag.name does not work HOT 4
- Grpc Gateway discards Any typed fields HOT 2
- Populating query param semantics changed since v2.15.0 HOT 3
- When the body is set to a oneof field, other fields in the same group are included as query.
- For a field of type google.protobuf.Empty, FieldMaskFromRequestBody does not generate any fieldmask HOT 3
- generate swagger schema title and description failed HOT 2
- Issue with importing "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" HOT 3
- genopenapi: Stable openapi names for nested types HOT 2
- snake_case response HOT 1
- api_visibility doesn't transitively apply to rpc request/response messages HOT 2
- protoc-gen-grpc-gateway and protoc-gen-openapiv2 return incorrect version HOT 1
- Dependency on google.golang.org/grpc/health/grpc_health_v1 conflicts with custom proto marshallers HOT 5
- JSONPb marshaler doesn't use indent on non proto fields
- WriteHeader is not called on 200s HOT 1
- How to set cookie to http response header? Why it doesn't work. HOT 2
- Adding custom mux endpoint to openapi output HOT 3
- The API Gateway Vision HOT 2
- Support disabling default response rendering in bazel rule HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grpc-gateway.