Giter VIP home page Giter VIP logo

Comments (2)

johanbrandhorst avatar johanbrandhorst commented on September 26, 2024 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.

insan1k avatar insan1k commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.