MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / recvHTTPResponseLoop

Method recvHTTPResponseLoop

pkg/controller/rtctrl/runtime.go:274–289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

272}
273
274func (info *RuntimeInfo) recvHTTPResponseLoop() {
275L:
276 for {
277 select {
278 case response := <-info.httpResponseChan:
279 httpResponse := response.Response
280 requestInfo := info.loadRequest(response.RequestID)
281 ConvertHTTPResponseToProxy(httpResponse, requestInfo)
282 info.InvokeDone(requestInfo, true)
283 case <-info.runtimeStopChan:
284 break L
285 }
286 }
287 info.runtimeWaitGroup.Done()
288 logs.Infof("runtime %s stop receiving http response", info.RuntimeID)
289}
290
291func (info *RuntimeInfo) loadRequest(requestID string) *RequestInfo {
292 if value, load := info.requestMap.Load(requestID); load {

Callers 2

recvResponseLoopMethod · 0.95
TestSendHTTPRequestLoopFunction · 0.80

Calls 5

loadRequestMethod · 0.95
InvokeDoneMethod · 0.95
InfofFunction · 0.92
DoneMethod · 0.80

Tested by 1

TestSendHTTPRequestLoopFunction · 0.64