MCPcopy Create free account
hub / github.com/eth-easl/dirigent / giveBackCCCapacity

Function giveBackCCCapacity

internal/data_plane/proxy/utils.go:38–47  ·  view source on GitHub ↗
(endpoint *common.UpstreamEndpoint)

Source from the content-addressed store, hash-verified

36}
37
38func 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
49func contextTerminationHandler(r *http.Request, coldStartChannel chan common.ColdStartChannelStruct) {
50 select {

Callers 2

fireRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected