joao-r-reis commented on PR #1858: URL: https://github.com/apache/cassandra-gocql-driver/pull/1858#issuecomment-2622054332
> I don't clearly understand how we can use the logic from the h.connectAddressLocked() if it computes connectAddress according to the IP's from the host which needs to be filled. As I see those IP's are filled inside of the hostInfoFromMap() method which requires *HostInfo. You would have those IPs as parameters of the function instead for example. > I think it is better to create raw structure here as it is now, and add the validation inside of the hostInfoFromMap() something like this: This can also work, as long as we guarantee that we don't have `HostInfo` objects going around with invalid IPs then I'm ok with it. I suggested the `NewHostInfo` function and replacing direct struct initialization with this function call because it would be a guaranteed way to ensure `HostInfo` objects always have valid IP addresses in the future -- 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]

