You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "jameshartig (via GitHub)" <gi...@apache.org> on 2025/01/25 21:52:28 UTC
Re: [PR] CASSGO-21 Remove HostPoolHostPolicy from gocql package [cassandra-gocql-driver]
jameshartig commented on PR #1770:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1770#issuecomment-2614111024
I'd really love if Go supported this:
```go
type hostPoolResponse interface {
Host() string
Mark(error)
}
type setHostsGetHost interface {
SetHosts([]string)
Get() hostPoolResponse
}
func HostPoolHostPolicy(hp setHostsGetHost) HostSelectionPolicy {
return &hostPoolHostPolicy{hostMap: map[string]*HostInfo{}, hp: hp}
}
```
Then we could get rid of the import but not break anything. Unfortunately, the above won't work because function signatures must match exactly.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org