MCPcopy
hub / github.com/IBM/sarama / NewClient

Function NewClient

internal/toxiproxy/client.go:17–36  ·  view source on GitHub ↗
(endpoint string)

Source from the content-addressed store, hash-verified

15}
16
17func 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
38func (c *Client) CreateProxy(
39 name string,

Callers 1

setupToxiProxiesFunction · 0.92

Calls

no outgoing calls

Tested by 1

setupToxiProxiesFunction · 0.74