MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / ResetHandler

Method ResetHandler

pkg/funclet/handler.go:228–242  ·  view source on GitHub ↗
(c *server.Context)

Source from the content-addressed store, hash-verified

226}
227
228func (f *Funclet) ResetHandler(c *server.Context) {
229 response := c.Response()
230 logger := c.Logger()
231
232 logger.V(6).Infof("reset node start")
233 defer logger.V(6).TimeTrack(time.Now(), "reset node finish")
234
235 err := f.Reset()
236 if err != nil {
237 response.WriteErrorString(http.StatusInternalServerError, err.Error())
238 c.WithErrorLog(err).WriteTo(response)
239 return
240 }
241 response.WriteHeaderAndEntity(http.StatusOK, "")
242}
243
244func (f *Funclet) GetNodeHandler(c *server.Context) {
245 response := c.Response()

Callers

nothing calls this directly

Calls 9

ResetMethod · 0.95
ResponseMethod · 0.80
LoggerMethod · 0.80
InfofMethod · 0.80
VMethod · 0.80
TimeTrackMethod · 0.80
WriteToMethod · 0.80
ErrorMethod · 0.45
WithErrorLogMethod · 0.45

Tested by

no test coverage detected