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

Function NewRequestInfo

pkg/controller/rtctrl/request.go:79–89  ·  view source on GitHub ↗
(requestID string, runtime *RuntimeInfo)

Source from the content-addressed store, hash-verified

77}
78
79func NewRequestInfo(requestID string, runtime *RuntimeInfo) *RequestInfo {
80 now := time.Now().UnixNano()
81 return &RequestInfo{
82 RequestID: requestID,
83 Runtime: runtime,
84 InvokeStartTimeNS: now,
85 InvokeStartTimeMS: now / int64(time.Millisecond),
86 SyncChannel: make(chan struct{}, 1),
87 TimeoutChannel: make(chan struct{}, 1),
88 }
89}
90
91func (info *RequestInfo) SetInitTime(preInit, postInit int64) {
92 info.InitStartTimeMS = preInit

Callers 4

TestRequestInfoFunction · 0.85
TestInvokeDoneFunction · 0.85
createRequestMethod · 0.85
TestHandleInvokeDoneFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestRequestInfoFunction · 0.68
TestInvokeDoneFunction · 0.68
TestHandleInvokeDoneFunction · 0.68