yifan-c commented on code in PR #66:
URL: https://github.com/apache/cassandra-sidecar/pull/66#discussion_r1302268890
##########
client/src/main/java/org/apache/cassandra/sidecar/client/SidecarClient.java:
##########
@@ -68,6 +69,26 @@ public SidecarClient(SidecarInstancesProvider
instancesProvider,
executor = requestExecutor;
}
+ /**
+ * Executes the Sidecar health request using the default retry policy and
configured selection policy
+ *
+ * @return a completable future of the Sidecar health response
+ */
+ public CompletableFuture<HealthResponse> sidecarHealth()
+ {
+ return
executor.executeRequestAsync(requestBuilder().sidecarHealthRequest().build());
Review Comment:
Rather than assume a retry policy and hardcoded in the client, what do you
think about this?
```java
public CompletableFuture<HealthResponse>
sidecarHealth(Consumer<RequestContext.Builder> requestOverrides)
{
RequestContext.Builder builder =
requestBuilder().sidecarHealthRequest();
requestOverrides.accept(builder);
return executor.executeRequestAsync(builder.build());
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]