mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-08-08 08:35:10 +08:00
Initial commit
This commit is contained in:
24
session-dealer/controller.go
Normal file
24
session-dealer/controller.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package session_dealer
|
||||
|
||||
import (
|
||||
"github.com/zr-hebo/sniffer-agent/session-dealer/mysql"
|
||||
)
|
||||
|
||||
func NewSession(sessionKey string, clientIP string, clientPort int, serverIP string, serverPort int) (session ConnSession) {
|
||||
switch serviceType {
|
||||
case ServiceTypeMysql:
|
||||
session = mysql.NewMysqlSession(sessionKey, clientIP, clientPort, serverIP, serverPort)
|
||||
default:
|
||||
session = mysql.NewMysqlSession(sessionKey, clientIP, clientPort, serverIP, serverPort)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CheckParams() {
|
||||
switch serviceType {
|
||||
case ServiceTypeMysql:
|
||||
mysql.CheckParams()
|
||||
default:
|
||||
mysql.CheckParams()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user