Open munakoiso opened 1 year ago
Hello.
Here is an implementation of a dialer using tls connect. Also I have added a function which returns a simple tls.Config. This is probably the most common way to create it, so I decided to put it in this library.
I think it might be useful.
Usage example:
tlsConfig, err := zk.CreateTLSConfig(rootCAFile, crtFile, keyFile) if err != nil { fmt.Println(err) return } timeout := 1 * time.Second baseDialer := net.Dialer{Timeout: timeout} dialer, err := zk.GetTLSDialer([]string{"hostname:2281"}, &baseDialer, tlsConfig) if err != nil { fmt.Println(err) return } conn, _, err := zk.Connect([]string{"hostname:2281"}, timeout, zk.WithDialer(dialer))
Hi, @nemith . Can you review this PR please?
I am not longer a maintainer on this project
@nemith Oh, sorry, but I can't find any information about maintainers here. Maybe you can tell me who are maintainers?
Hello.
Here is an implementation of a dialer using tls connect. Also I have added a function which returns a simple tls.Config. This is probably the most common way to create it, so I decided to put it in this library.
I think it might be useful.
Usage example: