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

Method GetNodeHandler

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

Source from the content-addressed store, hash-verified

242}
243
244func (f *Funclet) GetNodeHandler(c *server.Context) {
245 response := c.Response()
246 logger := c.Logger()
247
248 logger.V(6).Infof("get node start")
249 defer logger.TimeTrack(time.Now(), "get node finish")
250 info, err := f.NodeInfo()
251 if err != nil {
252 response.WriteErrorString(http.StatusInternalServerError, err.Error())
253 c.WithErrorLog(err).WriteTo(response)
254 return
255 }
256 response.WriteHeaderAndEntity(http.StatusOK, info)
257}

Callers

nothing calls this directly

Calls 9

NodeInfoMethod · 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