implement basic configuration
This commit is contained in:
@@ -2,6 +2,7 @@ package db
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/gocql/gocql"
|
||||
)
|
||||
@@ -9,8 +10,8 @@ import (
|
||||
var Session *gocql.Session
|
||||
|
||||
func InitScyllaDB() {
|
||||
cluster := gocql.NewCluster("127.0.0.1") // Replace with your ScyllaDB cluster IPs
|
||||
cluster.Keyspace = "chatservice" // Replace with your keyspace
|
||||
cluster := gocql.NewCluster(os.Getenv("SCYLLA_CLUSTER")) // Replace with your ScyllaDB cluster IPs
|
||||
cluster.Keyspace = os.Getenv("SCYLLA_KEYSPACE") // Replace with your keyspace
|
||||
cluster.Consistency = gocql.Quorum
|
||||
|
||||
session, err := cluster.CreateSession()
|
||||
|
Reference in New Issue
Block a user