(timeout time.Duration)
| 122 | } |
| 123 | |
| 124 | func (e *Exporter) getHTTPClient(timeout time.Duration) http.Client { |
| 125 | |
| 126 | return http.Client{ |
| 127 | Transport: &http.Transport{ |
| 128 | Proxy: http.ProxyFromEnvironment, |
| 129 | DialContext: (&net.Dialer{ |
| 130 | Timeout: timeout, |
| 131 | KeepAlive: 0, |
| 132 | }).DialContext, |
| 133 | MaxIdleConns: 1, |
| 134 | DisableKeepAlives: true, |
| 135 | IdleConnTimeout: 120 * time.Millisecond, |
| 136 | ExpectContinueTimeout: 1500 * time.Millisecond, |
| 137 | }, |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func (e *Exporter) getFunctions(endpointURL url.URL, namespace string) ([]types.FunctionStatus, error) { |
| 142 | timeout := 5 * time.Second |
no outgoing calls
no test coverage detected