worryg0d commented on code in PR #1793:
URL:
https://github.com/apache/cassandra-gocql-driver/pull/1793#discussion_r1935771006
##########
session.go:
##########
@@ -2177,6 +2203,15 @@ func (t *traceWriter) Trace(traceId []byte) {
}
}
+// GetHosts returns a list of hosts found via queries to system.local and
system.peers
+func (s *Session) GetHosts() ([]*HostInfo, error) {
Review Comment:
> Do we have no way of getting the hosts currently?
As I remember the driver doesn't expose API for this purpose. Users can get
this via policies like `HostSelectionPolicy`, but directly no.
> some users might be used to other drivers caching the hosts list
I think more about how we can avoid 2 round trips and we can probably take
known for the driver hosts from the pool `Session.executor.pool.hostConnPools`.
Each pool contains a reference to `HostInfo` for which it is created.
--
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]