diff --git a/proxy/process.go b/proxy/process.go index 8226cb0..d086edc 100644 --- a/proxy/process.go +++ b/proxy/process.go @@ -21,10 +21,6 @@ type Process struct { config ModelConfig cmd *exec.Cmd logMonitor *LogMonitor - - // Only useful for go testing the proxy functionality - // will leave the start/stop of process to go code - overrideProxyFunc *func(w http.ResponseWriter, r *http.Request) } func NewProcess(ID string, config ModelConfig, logMonitor *LogMonitor) *Process { @@ -170,19 +166,6 @@ func (p *Process) checkHealthEndpoint(cmdCtx context.Context, healthCheckTimeout } func (p *Process) ProxyRequest(w http.ResponseWriter, r *http.Request) { - if p.overrideProxyFunc != nil { - (*p.overrideProxyFunc)(w, r) - } else { - p.defaultProxyHandler(w, r) - } -} - -func (p *Process) SetOverride(f func(http.ResponseWriter, *http.Request)) { - p.overrideProxyFunc = &f -} - -// sends the request to the upstream process -func (p *Process) defaultProxyHandler(w http.ResponseWriter, r *http.Request) { if p.cmd == nil { http.Error(w, "process not started", http.StatusInternalServerError) return