FAQ
I've been working on a http.Transport that provides this too:
https://github.com/daaku/go.httpcontrol. The timeout approach is based
on https://github.com/mreiferson/go-httpclient/tree/go11_11. The
advantage compared to your approach is that it uses one goroutine per
client rather than one per connection, though it obviously needs locks
to sync which your approach doesn't need.

On Fri, May 31, 2013 at 11:57 AM, Jim Robinson wrote:
On Wednesday, May 29, 2013 8:29:24 PM UTC-7, Jim Robinson wrote:
On Wednesday, May 29, 2013 11:28:48 AM UTC-7, Stephen Day wrote:

Checkout Transport.ResponeHeaderTimeout
http://golang.org/pkg/net/http/#Transport. Using that, coupled with
Transport.CancelRequest should allow you to have timeouts and avoid
bypassing the connection pooling facilities.

Excellent, thank you very much for pointing that out!

Here's my first stab at it. Does this look reasonable to folks?

https://github.com/jimrobinson/httpclient/blob/master/httpclient.go

--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


--
-Naitik

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 28, '13 at 11:55p
activeJun 1, '13 at 12:47a
posts6
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase