22 lines
556 B
Go
22 lines
556 B
Go
package cassandra
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/gocql/gocql"
|
|
)
|
|
|
|
// 預設設定常數
|
|
const (
|
|
defaultNumConns = 10 // 預設每個節點的連線數量
|
|
defaultTimeoutSec = 10 // 預設連線逾時秒數
|
|
defaultMaxRetries = 3 // 預設重試次數
|
|
defaultPort = 9042
|
|
defaultConsistency = gocql.Quorum
|
|
defaultRetryMin = 1 * time.Second
|
|
defaultRetryMax = 30 * time.Second
|
|
defaultReconnectInitial = 1 * time.Second
|
|
defaultReconnectMax = 60 * time.Second
|
|
defaultCqlVersion = "3.0.0"
|
|
)
|