Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Add TLS support with ConnectTLS function #227

Open
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

linalinn
Copy link

Hello,
I added the function ConnectTLS to enable go-zookeeper
to connect to TLS protected zookeepers.
Also I did refactor the Connect func to prevent code redundancy.

@coveralls
Copy link

coveralls commented Nov 29, 2019

Coverage Status

Coverage decreased (-0.4%) to 79.239% when pulling f062bea on linalinn:tls into 2cc03de on samuel:master.

@linalinn
Copy link
Author

I don't understand the DeepSource error.
Can someone please help me with that?

Copy link

@msolo msolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like TLS can be implemented as a custom Dialer and injected via WithDialer(). That is a more minimal change that doesn't require any additional refactoring, just a relatively simple wrapper.

Given that TLS configs are often difficult to wire up correctly (particularly with a lot of complex reconnect code in the client here) including tests that cover TLS-enabled connections would improve confidence in the code change.

@linalinn
Copy link
Author

linalinn commented Dec 2, 2019

So I fixed the DeeSource Problems.
But i can't add a test for Zookeeper with tls because i don't understand how the test is configuring the Zookeeper for a test.
And isn't WithDialer() makred as depracated? so implementing TLS over WithDialer()
would be wrong or not?

@linalinn
Copy link
Author

linalinn commented Jan 3, 2020

Hello,
I have a problem with fixing this DeepSource fail.
I have tried it with adjusting the code like DeepSource suggested it.
Any suggestions how to solve this problem?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants