backend/pkg/library/cassandra/const.go

28 lines
730 B
Go
Raw Permalink Normal View History

2025-11-17 09:31:58 +00:00
package cassandra
import (
"time"
"github.com/gocql/gocql"
)
// 預設設定常數
const (
defaultNumConns = 10 // 預設每個節點的連線數量
defaultTimeoutSec = 10 // 預設連線逾時秒數
defaultMaxRetries = 3 // 預設重試次數
defaultPort = 9042
defaultConsistency = gocql.Quorum
defaultRetryMinInterval = 1 * time.Second
defaultRetryMaxInterval = 30 * time.Second
defaultReconnectInitialInterval = 1 * time.Second
defaultReconnectMaxInterval = 60 * time.Second
defaultCqlVersion = "3.0.0"
)
2025-11-19 05:33:06 +00:00
const (
DBFiledName = "db"
Pk = "partition_key"
ClusterKey = "clustering_key"
)