23 lines
595 B
Go
23 lines
595 B
Go
|
package cassandra
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"github.com/gocql/gocql"
|
||
|
)
|
||
|
|
||
|
// 預設設定常數
|
||
|
const (
|
||
|
defaultNumConnections = 10 // 預設每個節點的連線數量
|
||
|
defaultCqlVersion = "3.0.0"
|
||
|
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
|
||
|
spanName = "cassandra"
|
||
|
)
|