joao-r-reis commented on code in PR #1892:
URL:
https://github.com/apache/cassandra-gocql-driver/pull/1892#discussion_r2149911351
##########
host_source.go:
##########
@@ -181,9 +183,12 @@ type HostInfo struct {
tokens []string
}
-// NewHostInfo creates HostInfo with provided connectAddress and port.
+// NewHostInfoFromContactPoint creates HostInfo with provided connectAddress
and port.
// It returns an error if addr is invalid.
-func NewHostInfo(addr net.IP, port int) (*HostInfo, error) {
+//
+// If you're looking for a way to create a HostInfo object with more than just
an address and port for
+// testing purposes then you can use NewTestHostInfoFromRow
+func NewHostInfoFromContactPoint(addr net.IP, port int) (*HostInfo, error) {
Review Comment:
I checked and the only time we create host info objects from Addr and Port
is during init when we are converting contact points into HostPoints,
everywhere else we always use the row from the system table. I'm ok with
changing to `NewHostInfoFromAddrPort` though
--
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]