scylladb / scylla-go-driver

Experimental, high performance Scylla Driver, University of Warsaw students' project
Apache License 2.0
151 stars 7 forks source link

transport: QueryInfo contents inaccessible outside of transport #287

Open Kulezi opened 2 years ago

Kulezi commented 2 years ago

QueryInfo contains only unexported fields:

// QueryInfo represents data required for host selection policy to create query plan.
// Token and strategy are only necessary for token aware policies.
type QueryInfo struct {
    tokenAware bool
    token      Token
    topology   *topology
    strategy   strategy
    offset     uint64 // For round robin strategies.
}

This creates a problem that its impossible to create a custom HostSelectionPolicy outside of transport package that would make any use of QueryInfo

Kulezi commented 2 years ago

Also wouldn't QueryInfo benefit from holding keyspace (which has a strategy) instead of strategy?