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.
29 lines
678 B
Go
29 lines
678 B
Go
2 years ago
|
package mq
|
||
3 years ago
|
|
||
|
import (
|
||
|
"dcg/game/svc"
|
||
|
)
|
||
|
|
||
|
var (
|
||
3 years ago
|
danmakuMsgToPush MsgToPushHandler
|
||
|
giftMsgToPush GiftToPushHandler
|
||
2 years ago
|
nobilityTransfer NobilityTransferHandler
|
||
2 years ago
|
coinTransfer CoinTransferHandler
|
||
3 years ago
|
)
|
||
|
|
||
3 years ago
|
func Init(svc *svc.ServiceContext) {
|
||
|
danmakuMsgToPush.Init(svc)
|
||
|
giftMsgToPush.Init(svc)
|
||
2 years ago
|
nobilityTransfer.Init(svc)
|
||
2 years ago
|
coinTransfer.Init(svc)
|
||
|
|
||
|
run()
|
||
3 years ago
|
}
|
||
|
|
||
2 years ago
|
func run() {
|
||
3 years ago
|
go danmakuMsgToPush.ConsumerGroup.RegisterHandlerAndConsumer(&danmakuMsgToPush)
|
||
3 years ago
|
go giftMsgToPush.ConsumerGroup.RegisterHandlerAndConsumer(&giftMsgToPush)
|
||
2 years ago
|
go nobilityTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&nobilityTransfer)
|
||
2 years ago
|
go coinTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&coinTransfer)
|
||
3 years ago
|
}
|