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

Function GetLogType

pkg/api/server.go:43–52  ·  view source on GitHub ↗
(c *routing.Context)

Source from the content-addressed store, hash-verified

41)
42
43func GetLogType(c *routing.Context) LogType {
44 var t LogType
45 if t = LogType(c.Request.Header.Peek(HeaderLogType)); t.Valid() {
46 return t
47 }
48 if t = LogType(c.Request.URI().QueryArgs().Peek(QueryLogType)); t.Valid() {
49 return t
50 }
51 return LogTypeNone
52}
53
54func GetLogToBody(c *routing.Context) bool {
55 if b := string(c.Request.Header.Peek(HeaderLogToBody)); b == "true" {

Callers 2

InvokeHandlerMethod · 0.92
buildRequestFunction · 0.92

Calls 2

ValidMethod · 0.95
LogTypeTypeAlias · 0.85

Tested by

no test coverage detected