(c *routing.Context)
| 151 | } |
| 152 | |
| 153 | func (controller *Controller) InvalidateRuntime(c *routing.Context) error { |
| 154 | runtimeID := c.Param("runtimeID") |
| 155 | runtime, err := controller.runtimeDispatcher.GetRuntime(runtimeID) |
| 156 | if err != nil { |
| 157 | c.Response.SetStatusCode(http.StatusNotFound) |
| 158 | c.Response.AppendBodyString("can not find runtime " + runtimeID) |
| 159 | } |
| 160 | |
| 161 | if runtime == nil { |
| 162 | c.Response.SetStatusCode(http.StatusNotFound) |
| 163 | c.Response.AppendBodyString("can not find runtime " + runtimeID) |
| 164 | return nil |
| 165 | } |
| 166 | logs.Infof("invalidate runtime %d manually", runtimeID) |
| 167 | runtime.Invalidate() |
| 168 | return nil |
| 169 | } |
| 170 | |
| 171 | func generateInvokeRequest(c *routing.Context) *api.InvokeProxyRequest { |
| 172 | hMap := make(map[string]string) |
nothing calls this directly
no test coverage detected