|
@@ -55,25 +55,25 @@ type DiscoveryConfig struct {
|
|
|
// behavior to fit the most common use cases. Applications that requre a
|
|
// behavior to fit the most common use cases. Applications that requre a
|
|
|
// different setup must implement their own cluster.
|
|
// different setup must implement their own cluster.
|
|
|
type ClusterConfig struct {
|
|
type ClusterConfig struct {
|
|
|
- Hosts []string // addresses for the initial connections
|
|
|
|
|
- CQLVersion string // CQL version (default: 3.0.0)
|
|
|
|
|
- ProtoVersion int // version of the native protocol (default: 2)
|
|
|
|
|
- Timeout time.Duration // connection timeout (default: 600ms)
|
|
|
|
|
- Port int // port (default: 9042)
|
|
|
|
|
- Keyspace string // initial keyspace (optional)
|
|
|
|
|
- NumConns int // number of connections per host (default: 2)
|
|
|
|
|
- NumStreams int // number of streams per connection (default: max per protocol, either 128 or 32768)
|
|
|
|
|
- Consistency Consistency // default consistency level (default: Quorum)
|
|
|
|
|
- Compressor Compressor // compression algorithm (default: nil)
|
|
|
|
|
- Authenticator Authenticator // authenticator (default: nil)
|
|
|
|
|
- RetryPolicy RetryPolicy // Default retry policy to use for queries (default: 0)
|
|
|
|
|
- SocketKeepalive time.Duration // The keepalive period to use, enabled if > 0 (default: 0)
|
|
|
|
|
- ConnPoolType NewPoolFunc // The function used to create the connection pool for the session (default: NewSimplePool)
|
|
|
|
|
- DiscoverHosts bool // If set, gocql will attempt to automatically discover other members of the Cassandra cluster (default: false)
|
|
|
|
|
- MaxPreparedStmts int // Sets the maximum cache size for prepared statements globally for gocql (default: 1000)
|
|
|
|
|
- MaxRoutingKeyInfo int // Sets the maximum cache size for query info about statements for each session (default: 1000)
|
|
|
|
|
- PageSize int // Default page size to use for created sessions (default: 0)
|
|
|
|
|
- SerialConsistency Consistency // Sets the consistency for the serial part of queries, values can be either SERIAL or LOCAL_SERIAL (default: unset)
|
|
|
|
|
|
|
+ Hosts []string // addresses for the initial connections
|
|
|
|
|
+ CQLVersion string // CQL version (default: 3.0.0)
|
|
|
|
|
+ ProtoVersion int // version of the native protocol (default: 2)
|
|
|
|
|
+ Timeout time.Duration // connection timeout (default: 600ms)
|
|
|
|
|
+ Port int // port (default: 9042)
|
|
|
|
|
+ Keyspace string // initial keyspace (optional)
|
|
|
|
|
+ NumConns int // number of connections per host (default: 2)
|
|
|
|
|
+ NumStreams int // number of streams per connection (default: max per protocol, either 128 or 32768)
|
|
|
|
|
+ Consistency Consistency // default consistency level (default: Quorum)
|
|
|
|
|
+ Compressor Compressor // compression algorithm (default: nil)
|
|
|
|
|
+ Authenticator Authenticator // authenticator (default: nil)
|
|
|
|
|
+ RetryPolicy RetryPolicy // Default retry policy to use for queries (default: 0)
|
|
|
|
|
+ SocketKeepalive time.Duration // The keepalive period to use, enabled if > 0 (default: 0)
|
|
|
|
|
+ ConnPoolType NewPoolFunc // The function used to create the connection pool for the session (default: NewSimplePool)
|
|
|
|
|
+ DiscoverHosts bool // If set, gocql will attempt to automatically discover other members of the Cassandra cluster (default: false)
|
|
|
|
|
+ MaxPreparedStmts int // Sets the maximum cache size for prepared statements globally for gocql (default: 1000)
|
|
|
|
|
+ MaxRoutingKeyInfo int // Sets the maximum cache size for query info about statements for each session (default: 1000)
|
|
|
|
|
+ PageSize int // Default page size to use for created sessions (default: 0)
|
|
|
|
|
+ SerialConsistency SerialConsistency // Sets the consistency for the serial part of queries, values can be either SERIAL or LOCAL_SERIAL (default: unset)
|
|
|
Discovery DiscoveryConfig
|
|
Discovery DiscoveryConfig
|
|
|
SslOpts *SslOptions
|
|
SslOpts *SslOptions
|
|
|
}
|
|
}
|