We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the Question want to have a hertz golang client to unix domain socket calling.
Reproducible Code
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 }, }
Expected behavior
client unix domain socket backend calling to unix domain socket connection
Screenshots
Hertz version:
0.9.3
Environment:
go env GO111MODULE='' GOARCH='amd64' GOBIN='' GOCACHE='/root/.cache/go-build' GOENV='/root/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='*' GOMODCACHE='/root/go/pkg/mod' GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.23.1' GODEBUG=''
Additional context there's no information regarding this in doc. previously mentioned here: #1194
The text was updated successfully, but these errors were encountered:
@li-jin-gou @Duslia any help?
Sorry, something went wrong.
refer: https://github.com/cloudwego/hertz/blob/develop/pkg/app/client/client_test.go#L133
No branches or pull requests
Describe the Question
want to have a hertz golang client to unix domain socket calling.
Reproducible Code
something like... ?
client.WithNetwork("unix"), // <- here doesnt work like this. my backendAddr is "unix:///home/ubuntu/web.sock"
Expected behavior
client unix domain socket backend calling to unix domain socket connection
Screenshots
Hertz version:
0.9.3
Environment:
go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE='*'
GOMODCACHE='/root/go/pkg/mod'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.1'
GODEBUG=''
Additional context
there's no information regarding this in doc.
previously mentioned here:
#1194
The text was updated successfully, but these errors were encountered: