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

Function contextTerminationHandler

internal/data_plane/proxy/utils.go:49–59  ·  view source on GitHub ↗
(r *http.Request, coldStartChannel chan common.ColdStartChannelStruct)

Source from the content-addressed store, hash-verified

47}
48
49func contextTerminationHandler(r *http.Request, coldStartChannel chan common.ColdStartChannelStruct) {
50 select {
51 case <-r.Context().Done():
52 if coldStartChannel != nil {
53 coldStartChannel <- common.ColdStartChannelStruct{
54 Outcome: common.CanceledColdStart,
55 AddEndpointDuration: 0,
56 }
57 }
58 }
59}
60
61func HealthHandler(writer http.ResponseWriter, _ *http.Request) {
62 writer.WriteHeader(http.StatusOK)

Callers 2

fireRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected