scylladb / gocql

Package gocql implements a fast and robust ScyllaDB client for the Go programming language.
https://docs.scylladb.com/stable/using-scylla/drivers/cql-drivers/scylla-go-driver.html
BSD 3-Clause "New" or "Revised" License
169 stars 47 forks source link

Recent changes made imposible to have custom implementations for common interfaces #183

Closed dkropachev closed 1 month ago

dkropachev commented 1 month ago

Having private interface token: https://github.com/scylladb/gocql/blob/7f7905db2c37b557fd406596b3f7c456ed3ea1d3/token.go#L27-L30 And partitioner: https://github.com/scylladb/gocql/blob/7f7905db2c37b557fd406596b3f7c456ed3ea1d3/token.go#L20-L24

In public interfaces totaly breaks possibility of their custom implementation. Affected interfaces:

  1. SelectedHost: https://github.com/scylladb/gocql/blob/7f7905db2c37b557fd406596b3f7c456ed3ea1d3/policies.go#L324-L328

  2. ExecutableQuery: https://github.com/scylladb/gocql/blob/3c32c6cd75e529433ed0885d8c04ec4c96cf22a9/query_executor.go#L9-L28

  3. NextHost, because of references to SelectedHost https://github.com/scylladb/gocql/blob/7f7905db2c37b557fd406596b3f7c456ed3ea1d3/policies.go#L346

  4. HostSelectionPolicy, because of reference to NextHost