-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Refactoring: move all http.Transport configuration parameter parsing into one place #4624
Comments
@GiedriusS I would like to fix this issue. Please guide me how can I get started , I am new to this project. |
All of these functions and structs can be joined into one and we can use them everywhere consistently. Please let me know if you have any specific questions. |
So will replacing the NewTransport() function in exhttp with something like this help? func NewTransport(config HTTPConfig) *http.Transport {
return &http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
DualStack: true,
}).DialContext,
MaxIdleConns: config.MaxIdleConns,
MaxIdleConnsPerHost: config.MaxIdleConnsPerHost,
IdleConnTimeout: time.Duration(config.IdleConnTimeout),
MaxConnsPerHost: config.MaxConnsPerHost,
TLSHandshakeTimeout: time.Duration(config.TLSHandshakeTimeout),
ExpectContinueTimeout: time.Duration(config.ExpectContinueTimeout),
ResponseHeaderTimeout: time.Duration(config.ResponseHeaderTimeout),
DisableCompression: config.DisableCompression,
TLSClientConfig: &tls.Config{InsecureSkipVerify: config.InsecureSkipVerify},
}
} |
@4molybdenum2 I think replacing |
Ok, will check this out, maybe make a PR... |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
AC:
|
I am working on this issue🙌 |
Hey @saswatamcode,This issue can be closed with reference to the above merged PR. |
These are all functions/structs for configuring the same thing:
thanos/pkg/objstore/azure/helpers.go
Line 121 in 5bda2d4
thanos/pkg/objstore/cos/cos.go
Line 95 in 46ac4d5
thanos/pkg/objstore/s3/s3.go
Line 124 in bf96323
Another place being added: #4623
Move them into one struct. This probably belongs in
exthttp
.The text was updated successfully, but these errors were encountered: