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

Add HttpClients.forMultiAddressUrl() overload with ServiceDiscoverer #2843

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

idelpivnitskiy
Copy link
Member

@idelpivnitskiy idelpivnitskiy commented Feb 20, 2024

Motivation:

Users who need multi-address client with
DiscoveryStrategy.ON_NEW_CONNECTION and a custom ServiceDiscoverer
implementation need a new overload, because this strategy does not allow
changing ServiceDiscoverer later.

Modifications:

  • Add HttpClients.forMultiAddressUrl(String, ServiceDiscoverer, DiscoveryStrategy) overload;
  • Add a test case in HttpClientResolvesOnNewConnectionTest that
    verifies the new overload can be used to customize ServiceDiscoverer;

Result:

Easier can customize ServiceDiscoverer when they need a multi-address
client with DiscoveryStrategy.ON_NEW_CONNECTION.

Motivation:

Users who need multi-address client with
`DiscoveryStrategy.ON_NEW_CONNECTION` and a custom `ServiceDiscoverer`
implementation need a new overload, because this strategy does not allow
changing `ServiceDiscoverer` later.

Modifications:
- Add `HttpClients.forMultiAddressUrl(String, ServiceDiscoverer,
DiscoveryStrategy)` overload;
- Add a test case in `HttpClientResolvesOnNewConnectionTest` that
verifies the new overload can be used to customize `ServiceDiscoverer`;

Result:

Easier can customize `ServiceDiscoverer` when they need a multi-address
client with `DiscoveryStrategy.ON_NEW_CONNECTION`.
@idelpivnitskiy idelpivnitskiy merged commit bf64643 into apple:main Feb 20, 2024
15 checks passed
@idelpivnitskiy idelpivnitskiy deleted the forMultiAddress branch February 20, 2024 16:52
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.

None yet

2 participants