BewareMyPower commented on code in PR #170:
URL: https://github.com/apache/pulsar-client-cpp/pull/170#discussion_r1080827497


##########
include/pulsar/Client.h:
##########
@@ -66,6 +67,31 @@ class PULSAR_PUBLIC Client {
      */
     Client(const std::string& serviceUrl, const ClientConfiguration& 
clientConfiguration);
 
+    /**
+     * Create a Pulsar client object connecting to the specified cluster 
address and using the default
+     * configuration.
+     *
+     * <p>Instead of specifying a static service URL string (with {@link 
#serviceUrl(String)}), an application
+     * can pass a {@link ServiceUrlProvider} function that dynamically provide 
a service URL.
+     *
+     * @param serviceUrlProvider The serviceUrlProvider used to generate 
ServiceUrl.
+     * @throw std::invalid_argument if `serviceUrlProvider()` return a invalid 
url.
+     */
+    Client(ServiceUrlProvider serviceUrlProvider);

Review Comment:
   ```suggestion
       /**
        * @see Client(ServiceUrlProvider, const ClientConfiguration&)
        */
       Client(ServiceUrlProvider serviceUrlProvider) : 
Client(serviceUrlProvider, ClientConfiguration{}) {}
   ```
   
   Avoid unnecessary duplicated code and API docs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to