Пример #1
0
func Initialize() error {
	redisClient := client.GetNewRedisClient()

	_, wsClient, interceptor, err := NewWebSocketServer()
	if err != nil {
		return err
	}

	wsReceiver := NewWsMessageReceiver(interceptor, redisClient, wsClient)
	wsReceiver.Receive()

	rpcReceiver := NewRpcMessageReceiver(wsClient, wsReceiver)
	rpcReceiver.Receive()

	return nil
}
Пример #2
0
func NewMessageProcessor() MessageProcessor {
	return MessageProcessor{
		dbService:   db.NewDbService(),
		redisClient: client.GetNewRedisClient(),
	}
}