MCPcopy Create free account
hub / github.com/cortexproject/cortex / getPlanFromHTTPRequest

Function getPlanFromHTTPRequest

pkg/scheduler/scheduler.go:209–219  ·  view source on GitHub ↗
(req *httpgrpc.HTTPRequest)

Source from the content-addressed store, hash-verified

207}
208
209func 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.
222func (s *Scheduler) FrontendLoop(frontend schedulerpb.SchedulerForFrontend_FrontendLoopServer) error {

Callers 1

FrontendLoopMethod · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected