using Go's context instead goproxy.Ctx

104 views
Skip to first unread message

Elazar Leibovich

unread,
Jun 30, 2017, 12:19:01 AM6/30/17
to gopro...@googlegroups.com
Hi,

After some discussion with Almog Baku, I think it would be the best to replace goproxy.Ctx with go's context.

Is there any objection?

I'm interested with a slight breaking change. Would that be a problem?

Thanks,
Elazar

John Toebes

unread,
Aug 9, 2017, 2:30:21 PM8/9/17
to goproxy-dev
After reading through some of the code and finally learning how the go context works, I think that it would be a very welcome change.  

Elazar Leibovich

unread,
Aug 9, 2017, 4:01:32 PM8/9/17
to John Toebes, goproxy-dev
Have a look at goproxy2 then, there I'm fiddling with the API, trying to improve it:


--
You received this message because you are subscribed to the Google Groups "goproxy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to goproxy-dev+unsubscribe@googlegroups.com.
To post to this group, send email to gopro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/goproxy-dev/88162670-d068-4181-a620-a6c717188c21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Toebes

unread,
Aug 10, 2017, 8:31:25 AM8/10/17
to goproxy-dev, toe...@gmail.com
I pulled down the new version... The goproxy-httpdump example wants goproxy2/transport on line 19, so I was wondering if that is an oversight on the clone or is that a deliberate change you are expecting with the goproxy2 iteration?

Thanks!
  -- John

 
On Wednesday, August 9, 2017 at 4:01:32 PM UTC-4, Elazar Leibovich wrote:
Have a look at goproxy2 then, there I'm fiddling with the API, trying to improve it:

On Wed, Aug 9, 2017 at 9:30 PM, John Toebes <toe...@gmail.com> wrote:
After reading through some of the code and finally learning how the go context works, I think that it would be a very welcome change.  


On Friday, June 30, 2017 at 12:19:01 AM UTC-4, Elazar Leibovich wrote:
Hi,

After some discussion with Almog Baku, I think it would be the best to replace goproxy.Ctx with go's context.

Is there any objection?

I'm interested with a slight breaking change. Would that be a problem?

Thanks,
Elazar

--
You received this message because you are subscribed to the Google Groups "goproxy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to goproxy-dev...@googlegroups.com.

John Toebes

unread,
Aug 15, 2017, 10:53:38 AM8/15/17
to goproxy-dev, toe...@gmail.com
Ok I have been running code through the new fork and had to do a bit of a cleanup of the context interface.  I like having the context separated out because it means you can call the RoundTripper function directly and it cleans up many of the routines.  From a performance side however, I was concerned about having broken out the different pieces of the context into separate context elements stored on the request.  This means that the system would have to search through multiple.  Instead I went back to the structure you had but put it on the Context.  I've got several of the examples running now and submitted a merge request back to your fork.  Feel free to make any suggestions.

 I'm working on the making more of the examples - particularly the HTTPDUMP one.
Reply all
Reply to author
Forward
0 new messages