Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alpe committed Jan 15, 2024
1 parent 9b99c6c commit e71df9f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions pkg/proxy/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,6 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
newReverseProxy(host).ServeHTTP(w, proxyRequest)
}

func withInflightCounted(endpoints *endpoints.Manager, deploy string, host string) func(other http.Handler) http.HandlerFunc {
return func(other http.Handler) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
done, err := endpoints.RegisterInFlight(deploy, host)
if err != nil {
log.Printf("error registering in-flight request: %v", err)
w.WriteHeader(http.StatusInternalServerError)
return
}
defer done()

other.ServeHTTP(w, r)
}
}
}

// parseModel parses the model name from the request
// returns empty string when none found or an error for failures on the proxy request object
func parseModel(r *http.Request) (string, *http.Request, error) {
Expand Down

0 comments on commit e71df9f

Please sign in to comment.