Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Make it possible to supply your own http client #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rrva
Copy link

@rrva rrva commented Mar 1, 2015

No description provided.

@vieux
Copy link
Contributor

vieux commented Mar 2, 2015

I don't see why not, but could you please tell us what you are planning to do ?

@rrva
Copy link
Author

rrva commented Mar 2, 2015

At https://github.com/rrva/docker-devdns I wanted to specify a timeout on all docker operations.
Figure this is only sensible to do on read requests, not on write requests (would not want to fire-and-forget a run container command in the same way), but I want to timeout pretty aggressively on ListContainers / InspectContainer requests. I use ResponseHeaderTimeout transport setting on the httpclient for this.

From http://golang.org/src/net/http/transport.go?s=1324:4038#L39

// ResponseHeaderTimeout, if non-zero, specifies the amount of
// time to wait for a server's response headers after fully
// writing the request (including its body, if any). This
// time does not include the time to read the response body.
ResponseHeaderTimeout time.Duration
// contains filtered or unexported fields

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants