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

Feature Request: First class way to open connects to specific hosts of a service #877

Open
leonz opened this issue Jun 30, 2020 · 2 comments

Comments

@leonz
Copy link

leonz commented Jun 30, 2020

Dialogue has some cool utilities and abstractions that make it easy to create and reuse clients per-service, but nothing to help with creating clients if you need to create connections to specific nodes/hosts of a service.

This is a use case that we regularly run into with Cassandra and any services that interact with it at a management level.

@iamdanfox
Copy link
Contributor

@leonz I actually recently added a PerHostClientFactory so you can turn a list of uris into a list of channels:

public interface PerHostClientFactory {
/** Single-uri channels. */
Refreshable<List<Channel>> getPerHostChannels();
<T> Refreshable<List<T>> getPerHost(Class<T> clientInterface);
}
.

Do you think this could work for your use-case?

@leonz
Copy link
Author

leonz commented Jul 7, 2020

Hi Dan,

Thanks for that! Is there a reason that the interface returns a list of channels rather than a map of hosts to channel?

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

No branches or pull requests

2 participants