Skip to content
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

Make dialer extensible by making it an interface #95

Closed
wants to merge 1 commit into from

Conversation

pawelbeza
Copy link

@pawelbeza pawelbeza commented Oct 23, 2022

Hi, could we make dialer an interface so that we could make it more extensible?

To give you an example why it would be a great feature ...

In our case we'd like to add exponential backoff if zookeeper is not reachable. Currently it's not possible to implement as that would require keeping some state inside dialer. Since dialer is currently a function it's not possible to do that.

That's why it would be awesome to make dialer an interface instead and make it more extensible this way :)

@nemith
Copy link

nemith commented Jan 2, 2023

This is a breaking change and moves away from the function signature in the ‘net’ package. You should be able to handle this with a closure or even pass a method in.

@pawelbeza pawelbeza closed this Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants