Function
getPlanFromHTTPRequest
(req *httpgrpc.HTTPRequest)
Source from the content-addressed store, hash-verified
| 207 | } |
| 208 | |
| 209 | func getPlanFromHTTPRequest(req *httpgrpc.HTTPRequest) ([]byte, error) { |
| 210 | if req.Body == nil { |
| 211 | return nil, nil |
| 212 | } |
| 213 | values, err := url.ParseQuery(string(req.Body)) |
| 214 | if err != nil { |
| 215 | return nil, err |
| 216 | } |
| 217 | plan := values.Get("plan") |
| 218 | return []byte(plan), nil |
| 219 | } |
| 220 | |
| 221 | // FrontendLoop handles connection from frontend. |
| 222 | func (s *Scheduler) FrontendLoop(frontend schedulerpb.SchedulerForFrontend_FrontendLoopServer) error { |
Tested by
no test coverage detected