mirror of
https://github.com/openfaas/faas.git
synced 2025-06-21 00:06:38 +00:00
Update comments
- updates comments and adds where missing - updates locks so that unlock is done via defer instead of at the end of the statement - extracts timeout variable in two places - remove makeClient() unused method from metrics package No-harm changes tested via go build. Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
@ -24,11 +24,13 @@ import (
|
||||
|
||||
// NewExternalServiceQuery proxies service queries to external plugin via HTTP
|
||||
func NewExternalServiceQuery(externalURL url.URL, credentials *auth.BasicAuthCredentials) handlers.ServiceQuery {
|
||||
timeout := 3 * time.Second
|
||||
|
||||
proxyClient := http.Client{
|
||||
Transport: &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
DialContext: (&net.Dialer{
|
||||
Timeout: 3 * time.Second,
|
||||
Timeout: timeout,
|
||||
KeepAlive: 0,
|
||||
}).DialContext,
|
||||
MaxIdleConns: 1,
|
||||
|
Reference in New Issue
Block a user