func (f *framework) startHTTP() {
	f.log.Printf("serving grpc on %s\n", f.ln.Addr())
	server := f.task.CreateServer()
	err := server.Serve(f.ln)
	select {
	case <-f.globalStop:
		server.Stop()
		f.log.Printf("grpc stops serving")
	default:
		if err != nil {
			f.log.Fatalf("grpc.Serve returns error: %v\n", err)
		}
	}
}
// Framework http server for data request.
// Each request will be in the format: "/datareq?taskID=XXX&req=XXX".
// "taskID" indicates the requesting task. "req" is the meta data for this request.
// On success, it should respond with requested data in http body.
Framework http server for data request.
Each request will be in the format: "/datareq?taskID=XXX&req=XXX".
"taskID" indicates the requesting task. "req" is the meta data for this request.
On success, it should respond with requested data in http body.
// Framework http server for data request . // Each request will be in the format : " / datareq?taskID = XXX&req = XXX " . // " taskID " indicates the requesting task . " req " is the meta data for this request . // On success it should respond with requested data in http body .
func (f *framework) startHTTP() {
	f.log.Printf("serving grpc on %s\n", f.ln.Addr())
	server := f.task.CreateServer()
	err := server.Serve(f.ln)
	select {
	case <-f.globalStop:
		server.Stop()
		f.log.Printf("grpc stops serving")
	default:
		if err != nil {
			f.log.Fatalf("grpc.Serve returns error: %v\n", err)
		}
	}
}
func ( f * framework ) startHTTP ( ) { f . log . Printf ( " \n " , f . ln . Addr ( ) ) server := f . task . CreateServer ( ) err := server . Serve ( f . ln ) select { case <- f . globalStop : server . Stop ( ) f . log . Printf ( " " ) default : if err != nil { f . log . Fatalf ( " \n " , err ) } } }
Framework http server for data request.
Framework http server for data request .