You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
833 B
Go

package msg_transfer
import (
"dcg/game/svc"
)
var (
danmakuMsgToPush MsgToPushHandler
giftMsgToPush GiftToPushHandler
nobilityTransfer NobilityTransferHandler
//rewardTransfer RewardTransferHandler
coinTransfer CoinTransferHandler
)
func Init(svc *svc.ServiceContext) {
danmakuMsgToPush.Init(svc)
giftMsgToPush.Init(svc)
nobilityTransfer.Init(svc)
//rewardTransfer.Init(svc)
coinTransfer.Init(svc)
run()
}
func run() {
go danmakuMsgToPush.ConsumerGroup.RegisterHandlerAndConsumer(&danmakuMsgToPush)
go giftMsgToPush.ConsumerGroup.RegisterHandlerAndConsumer(&giftMsgToPush)
go nobilityTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&nobilityTransfer)
//go rewardTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&rewardTransfer)
go coinTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&coinTransfer)
}