-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement context.Context #17
Comments
To be honest, the performance would be improved if we implemented a context passing function signature. I have been purposely leaving it out of vestigo for two reasons: 1.) I wanted to stay consistant with the standard lib http.Handler function signature When that future day happens, vestigo will be able to benefit directly, and will improve in performance. In the mean time, I would suggest using a project like backdrop or gorilla context to allow yourself to access a context across middlewares/handlers. |
here is the code review for context in net/http/request.go for 1.7. When go 1.7 comes out, I feel like we should cut a new breaking version of vestigo that utilizes the net/context constructs in the new standard library. |
Hi, thanks for the update!!! that looks really promising!! Can't wait to be able to use that! |
Have you thought about using build constraints for 1.7 so you don't have to wait? A good example: |
#41 <- initial attempt at using request context instead of url params |
Cool! Looks good to me. I updated my project to use your Param function: blue-jay/blueprint@8e09812 My only suggestion is to move Param, ParamNames, and AddParam into their own files, away from the other code in common.go/common_legacy.go to reduce duplication. Maybe do param.go and param_legacy.go. |
Little "question about" or "request for" context.Context
I know it is something vestigo is not, and probably will implement.
Since you have studied and written about the mainstream mux/routing tools in golang I'd like to know how to implement golang's context.Context or something similar into Vestigo..
This article is pretty clear on how to do it with the default http.Handler but i think it is not very idiomatic.
Would it be possible to do something like goji does ? And limit it to
I have no idea if and how it would influence the performance.
The text was updated successfully, but these errors were encountered: