(endpoint string)
| 15 | } |
| 16 | |
| 17 | func NewClient(endpoint string) *Client { |
| 18 | return &Client{ |
| 19 | httpClient: &http.Client{ |
| 20 | Transport: &http.Transport{ |
| 21 | Proxy: http.ProxyFromEnvironment, |
| 22 | DialContext: (&net.Dialer{ |
| 23 | Timeout: 30 * time.Second, |
| 24 | KeepAlive: 30 * time.Second, |
| 25 | }).DialContext, |
| 26 | ForceAttemptHTTP2: true, |
| 27 | MaxIdleConns: -1, |
| 28 | DisableKeepAlives: true, |
| 29 | IdleConnTimeout: 90 * time.Second, |
| 30 | TLSHandshakeTimeout: 10 * time.Second, |
| 31 | ExpectContinueTimeout: 1 * time.Second, |
| 32 | }, |
| 33 | }, |
| 34 | endpoint: endpoint, |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | func (c *Client) CreateProxy( |
| 39 | name string, |
no outgoing calls