frankgh commented on code in PR #72:
URL: https://github.com/apache/cassandra-sidecar/pull/72#discussion_r1367526443
##########
src/main/java/org/apache/cassandra/sidecar/config/ServiceConfiguration.java:
##########
@@ -33,11 +36,33 @@ public interface ServiceConfiguration
*/
String host();
+ /**
+ * Returns a list of interfaces where the Sidecar process will bind and
listen for connections. Defaults to
+ * the configured {@link #host()}.
+ *
+ * @return a list of interfaces where Sidecar will listen
+ */
+ default List<String> listenInterfaces()
+ {
+ return Collections.singletonList(Objects.requireNonNull(host(), "host
must be provided"));
+ }
+
/**
* @return Sidecar's HTTP REST API port
*/
int port();
+ /**
+ * Returns a list of ports where the Sidecar process will bind and listen
for connections. Defaults to
+ * the configured {@link #port()}
+ *
+ * @return a list of ports where Sidecar will listen
+ */
+ default List<Integer> ports()
+ {
+ return Collections.singletonList(port());
Review Comment:
makes sense, I will modify the API
--
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]