コード例 #1
0
ファイル: server.go プロジェクト: neutrinoapp/neutrino
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(),
	}
}