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

Method startRecvLog

pkg/controller/rtctrl/client.go:237–258  ·  view source on GitHub ↗
(reqInfo *RequestInfo, logType string)

Source from the content-addressed store, hash-verified

235}
236
237func (s *RuntimeClient) startRecvLog(reqInfo *RequestInfo, logType string) {
238 userID := reqInfo.Runtime.UserID
239 if userID == "" {
240 logs.Warn("user id is empty, set to unknown")
241 userID = "unknown"
242 }
243 params := LogStatStoreParameter{
244 RequestID: reqInfo.RequestID,
245 TriggerType: reqInfo.TriggerType,
246 RuntimeID: reqInfo.Runtime.RuntimeID,
247 UserID: userID,
248 FunctionName: *reqInfo.Input.Configuration.FunctionName,
249 FunctionBrn: *reqInfo.Input.Configuration.FunctionArn,
250 FunctionVersion: *reqInfo.Input.Configuration.Version,
251 FilePath: s.dispatchServer.config.UserLogFileDir,
252 LogType: logType,
253 }
254 lss := newLogStatStore(&params)
255 s.dispatchServer.StartRecvLog(reqInfo.Runtime.RuntimeID, reqInfo.RequestID, lss)
256 reqInfo.SetLogStore(lss)
257 return
258}

Callers 1

InvokeFunctionMethod · 0.95

Calls 4

WarnFunction · 0.92
newLogStatStoreFunction · 0.85
StartRecvLogMethod · 0.80
SetLogStoreMethod · 0.80

Tested by

no test coverage detected