(endpoint *common.UpstreamEndpoint)
| 36 | } |
| 37 | |
| 38 | func giveBackCCCapacity(endpoint *common.UpstreamEndpoint) { |
| 39 | endpointInflight := atomic.AddInt32(&endpoint.InFlight, -1) |
| 40 | if atomic.LoadInt32(&endpoint.Drained) != 0 && endpointInflight == 0 { |
| 41 | endpoint.DrainingCallback <- struct{}{} |
| 42 | } |
| 43 | |
| 44 | if endpoint.Capacity != nil { |
| 45 | endpoint.Capacity <- struct{}{} |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | func contextTerminationHandler(r *http.Request, coldStartChannel chan common.ColdStartChannelStruct) { |
| 50 | select { |
no outgoing calls
no test coverage detected