|
|
@@ -22,27 +22,6 @@ func (p PoolConfig) buildPool(session *Session) *policyConnPool {
|
|
|
return newPolicyConnPool(session)
|
|
|
}
|
|
|
|
|
|
-type DiscoveryConfig struct {
|
|
|
- // If not empty will filter all discovered hosts to a single Data Centre (default: "")
|
|
|
- DcFilter string
|
|
|
- // If not empty will filter all discovered hosts to a single Rack (default: "")
|
|
|
- RackFilter string
|
|
|
- // ignored
|
|
|
- Sleep time.Duration
|
|
|
-}
|
|
|
-
|
|
|
-func (d DiscoveryConfig) matchFilter(host *HostInfo) bool {
|
|
|
- if d.DcFilter != "" && d.DcFilter != host.DataCenter() {
|
|
|
- return false
|
|
|
- }
|
|
|
-
|
|
|
- if d.RackFilter != "" && d.RackFilter != host.Rack() {
|
|
|
- return false
|
|
|
- }
|
|
|
-
|
|
|
- return true
|
|
|
-}
|
|
|
-
|
|
|
// ClusterConfig is a struct to configure the default cluster implementation
|
|
|
// of gocoql. It has a variety of attributes that can be used to modify the
|
|
|
// behavior to fit the most common use cases. Applications that require a
|
|
|
@@ -70,8 +49,6 @@ type ClusterConfig struct {
|
|
|
// configuration of host selection and connection selection policies.
|
|
|
PoolConfig PoolConfig
|
|
|
|
|
|
- Discovery DiscoveryConfig
|
|
|
-
|
|
|
// If not zero, gocql attempt to reconnect known DOWN nodes in every ReconnectSleep.
|
|
|
ReconnectInterval time.Duration
|
|
|
|