(c *server.Context)
| 186 | } |
| 187 | |
| 188 | func (f *Funclet) CoolDownHandler(c *server.Context) { |
| 189 | response := c.Response() |
| 190 | logger := c.Logger() |
| 191 | |
| 192 | params := api.ResetRequest{} |
| 193 | if err := c.Request().ReadEntity(¶ms); err != nil { |
| 194 | c.WithWarnLog(err).WriteTo(response) |
| 195 | return |
| 196 | } |
| 197 | logger.V(6).Infof("cool down container %s start", params.ContainerID) |
| 198 | defer logger.TimeTrack(time.Now(), "cool down container finish") |
| 199 | fCtx := f.NewContext(c.RequestID(), logger) |
| 200 | err, res := f.ResetContainerEvent(fCtx, ¶ms) |
| 201 | if err != nil { |
| 202 | c.WithErrorLog(err).WriteTo(response) |
| 203 | return |
| 204 | } |
| 205 | response.WriteHeaderAndEntity(http.StatusOK, res) |
| 206 | } |
| 207 | |
| 208 | func (f *Funclet) RebornHandler(c *server.Context) { |
| 209 | response := c.Response() |
nothing calls this directly
no test coverage detected