Closed sprappcom closed 1 month ago
something like... ? client.WithNetwork("unix"), // <- here doesnt work like this. my backendAddr is "unix:///home/ubuntu/web.sock"
newPool = &sync.Pool{ New: func() interface{} { cli, err := client.NewClient( client.WithDialTimeout(1*time.Second), client.WithMaxConnsPerHost(10240), client.WithMaxIdleConnDuration(30*time.Second), client.WithMaxConnDuration(0), client.WithMaxConnWaitTimeout(10*time.Second), client.WithKeepAlive(true), client.WithNetwork("unix"), // <- here doesnt work like this. my backendAddr is "unix:///home/ubuntu/web.sock" client.WithClientReadTimeout(60*time.Second), client.WithWriteTimeout(60*time.Second), client.WithDialer(standard.NewDialer()), client.WithTLSConfig(&tls.Config{InsecureSkipVerify: true}), client.WithHostClientConfigHook(func(hc interface{}) error { if hct, ok := hc.(*http1.HostClient); ok { hct.Addr = backendAddr } return nil }), ) if err != nil { log.Fatalf("failed to create client for %s: %v", backendAddr, err) } return cli }, }
latest ubuntu 24.04, latest golang, latest hertz
This issue has been marked as invalid question, please give more information by following the issue template. The issue will be closed in 1 days if no further activity occurs.
issue
something like... ? client.WithNetwork("unix"), // <- here doesnt work like this. my backendAddr is "unix:///home/ubuntu/web.sock"
latest ubuntu 24.04, latest golang, latest hertz