func startRpc(server *utils.Server, internalRaterChan chan *engine.Responder, internalCdrSChan chan *engine.CdrServer, internalCdrStatSChan chan engine.StatsInterface, internalHistorySChan chan history.Scribe, internalPubSubSChan chan engine.PublisherSubscriber, internalUserSChan chan engine.UserService, internalAliaseSChan chan engine.AliasService) { select { // Any of the rpc methods will unlock listening to rpc requests case resp := <-internalRaterChan: internalRaterChan <- resp case cdrs := <-internalCdrSChan: internalCdrSChan <- cdrs case cdrstats := <-internalCdrStatSChan: internalCdrStatSChan <- cdrstats case hist := <-internalHistorySChan: internalHistorySChan <- hist case pubsubs := <-internalPubSubSChan: internalPubSubSChan <- pubsubs case users := <-internalUserSChan: internalUserSChan <- users case aliases := <-internalAliaseSChan: internalAliaseSChan <- aliases } go server.ServeJSON(cfg.RPCJSONListen) go server.ServeGOB(cfg.RPCGOBListen) go server.ServeHTTP(cfg.HTTPListen) }
func startRpc(server *utils.Server, internalRaterChan, internalCdrSChan, internalCdrStatSChan, internalHistorySChan, internalPubSubSChan, internalUserSChan, internalAliaseSChan, internalSMGChan chan rpcclient.RpcClientConnection) { select { // Any of the rpc methods will unlock listening to rpc requests case resp := <-internalRaterChan: internalRaterChan <- resp case cdrs := <-internalCdrSChan: internalCdrSChan <- cdrs case cdrstats := <-internalCdrStatSChan: internalCdrStatSChan <- cdrstats case hist := <-internalHistorySChan: internalHistorySChan <- hist case pubsubs := <-internalPubSubSChan: internalPubSubSChan <- pubsubs case users := <-internalUserSChan: internalUserSChan <- users case aliases := <-internalAliaseSChan: internalAliaseSChan <- aliases case smg := <-internalSMGChan: internalSMGChan <- smg } go server.ServeJSON(cfg.RPCJSONListen) go server.ServeGOB(cfg.RPCGOBListen) go server.ServeHTTP(cfg.HTTPListen) }