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

Allowed implementation of HostSelectionPolicy outside the gocql pkg #1754

Conversation

worryg0d
Copy link

@worryg0d worryg0d commented May 29, 2024

This PR allows implementation of HostSelectionPolicy interface outside the gocql package.
Also, it adds NewHostInfo constructor for testing purposes. We need this because HostSelectionPolicy, HostFilter, and other options of ClusterConfig are presented as a public interface so they may be implemented outside the gocql package. But those custom implementations cannot be tested, because all fields of HostInfo are private and protected from concurrent changes by mutex.

closes #1759

@worryg0d
Copy link
Author

Closed due to HostSelectionPolicy is available to be implemented, but it cannot be easily tested due to HostSelectionPolicy.Pick(ExectuableQuery) method.

@worryg0d worryg0d closed this Nov 26, 2024
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.

Allow implementing ExecutableQuery interface
2 participants