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

Method ContainerListHandler

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

Source from the content-addressed store, hash-verified

106}
107
108func (f *Funclet) ContainerListHandler(c *server.Context) {
109 response := c.Response()
110 logger := c.Logger()
111
112 logger.V(6).Infof("Get container list")
113 defer logger.TimeTrack(time.Now(), "Get container list finish")
114
115 criteria := api.NewListContainerCriteria()
116 criteria.ReadFromRequest(c.HTTPRequest())
117 containerList, err := f.List(criteria)
118 if err != nil {
119 response.WriteErrorString(http.StatusInternalServerError, err.Error())
120 c.WithErrorLog(err).WriteTo(response)
121 return
122 }
123 response.WriteHeaderAndEntity(http.StatusOK, containerList)
124}
125
126func (f *Funclet) ContainerInfoHandler(c *server.Context) {
127 request := c.Request()

Callers

nothing calls this directly

Calls 12

ListMethod · 0.95
NewListContainerCriteriaFunction · 0.92
ResponseMethod · 0.80
LoggerMethod · 0.80
InfofMethod · 0.80
VMethod · 0.80
TimeTrackMethod · 0.80
HTTPRequestMethod · 0.80
WriteToMethod · 0.80
ReadFromRequestMethod · 0.65
ErrorMethod · 0.45
WithErrorLogMethod · 0.45

Tested by

no test coverage detected