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