mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-08-08 07:56:57 +08:00
add more info
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
package session_dealer
|
||||
|
||||
import (
|
||||
"github.com/zr-hebo/sniffer-agent/model"
|
||||
"github.com/zr-hebo/sniffer-agent/session-dealer/mysql"
|
||||
)
|
||||
|
||||
func NewSession(sessionKey *string, clientIP *string, clientPort int, serverIP *string, serverPort int) (session ConnSession) {
|
||||
func NewSession(sessionKey *string, clientIP *string, clientPort int, serverIP *string, serverPort int,
|
||||
receiver chan model.QueryPiece) (session ConnSession) {
|
||||
switch serviceType {
|
||||
case ServiceTypeMysql:
|
||||
session = mysql.NewMysqlSession(sessionKey, clientIP, clientPort, serverIP, serverPort)
|
||||
session = mysql.NewMysqlSession(sessionKey, clientIP, clientPort, serverIP, serverPort, receiver)
|
||||
default:
|
||||
session = mysql.NewMysqlSession(sessionKey, clientIP, clientPort, serverIP, serverPort)
|
||||
session = mysql.NewMysqlSession(sessionKey, clientIP, clientPort, serverIP, serverPort, receiver)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user