-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
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
Support for Unix Domain Sockets #23
Comments
Hey buddy! Good to hear from you 🤗 I was not aware beanstalk 1.12 supported UDS and it definitely would be nice to add it. It looks like a change is needed in ParseURI(). Perhaps the function return types need to change to something like this: type uriType string
const (
uriTCPType uriType = "tcp"
uriTLSType uriType = "tls"
uriUDSType uriType = "unix"
)
// XXX: Might as well unexported this function.
func parseURI(v string) (string, uriType, error) {
// ...
} So that in Dial() we can do something like this: func Dial(uri string, config Config) (*Conn, error) {
addr, ut, err := ParseURI(uri)
if err != nil {
return nil, err
}
config = config.normalize()
vat netConn net.Conn
switch ut {
case uriTCPType:
// ...
} Does that make sense? |
Thanks for the suggestions. I have submitted a PR. |
Thanks for the PR, bud! сливаться 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
Beanstalkd 1.12 supports Unix Domain Sockets (commit).
Unfortunately, the current client implementation only supports TCP sockets. Even though adding UDS support is trivial and beneficial for people who do not want to have TCP overhead.
Do you want to support UDS?
If not, please close the issue.
If yes, would you prefer just another URL prefix, like
unix://
,Or is your preference to give a way to construct
beanstalk.Conn
by passingnet.Conn
as a parameter?I can prepare a PR if this looks interesting.
Cheers.
The text was updated successfully, but these errors were encountered: