Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FreeClusterConn ¶
func FreeClusterConn()
func InitClusterConn ¶
func InitClusterConn(hosts [][]string, port int, db, username, password, dsnParams string, secure, skipVerify bool, maxOpenConns int) (err error)
Each shard has a clickhouse.Conn which connects to one replica inside the shard. We need more control than replica single-point-failure.
Types ¶
type ShardConn ¶
type ShardConn struct {
// contains filtered or unexported fields
}
ShardConn a datastructure for storing the clickhouse connection
func GetShardConn ¶
GetShardConn select a clickhouse shard based on batchNum
func (*ShardConn) GetReplica ¶
GetReplica returns the replica to which db connects
Click to show internal directories.
Click to hide internal directories.