package service import ( "fmt" "samba/pkg/servername" "samba/pkg/service" gs "samba/server/game/service" "samba/util/config" ) type cathetaService struct { service.IService AutoWaitStop bool // 旧服务,没人使用时自动关闭 } func (c cathetaService) SendMsgToGate(uid int64, msgId string, msg interface{}) { gs.SendMsgToGate(c, uid, msgId, msg) } func (c cathetaService) SendMsgToOther(srvName, routingKey string, uid int64, msgId string, msg interface{}) { gs.SendMsgToOther(CathetaService, srvName, routingKey, uid, msgId, msg) } var CathetaService cathetaService func QueueName() string { return fmt.Sprintf("%v-%v", servername.Cacheta, config.Cmd.ChildId) } func SendMsg(exchange, routingKey string, roomId int, token string, uid int64, msgId string, msg interface{}) { gs.SendMsg(CathetaService, exchange, routingKey, roomId, token, uid, msgId, msg) } func SendMsgToDb(routingKey string, uid int64, msgId string, msg interface{}) { gs.SendMsgToDb(CathetaService, routingKey, uid, msgId, msg) } func SendMsgToOther(srvName, routingKey string, uid int64, msgId string, msg interface{}) { gs.SendMsgToOther(CathetaService, srvName, routingKey, uid, msgId, msg) } func SendMsgToGate(uid int64, msgId string, msg interface{}) { gs.SendMsgToGate(CathetaService, uid, msgId, msg) } func BroadcastMsg(msgId string, msg any) { gs.BroadcastMsg(CathetaService, msgId, msg) } var ParseMsg = gs.ParseMsg