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

Method initRunner

pkg/controller/rtctrl/runner.go:65–81  ·  view source on GitHub ↗

initRunner

(params *startRunnerParams)

Source from the content-addressed store, hash-verified

63
64// initRunner
65func (info *RuntimeInfo) initRunner(params *startRunnerParams) error {
66 info.RebootWait()
67 logs.V(5).Infof("runner %s is rebooting", info.RuntimeID)
68
69 info.invokeLock.Lock()
70 defer info.invokeLock.Unlock()
71
72 if info.State != RuntimeStateClosed {
73 logs.Errorf("runtime %s current states is %s", info.RuntimeID, info.State)
74 return fmt.Errorf("duplicate runner")
75 }
76
77 info.SetState(RuntimeStateCold)
78 info.runnerConn = params.conn
79 info.Abnormal = false
80 return nil
81}
82
83// stopRunner
84func (info *RuntimeInfo) stopRunner() {

Callers 2

startRunnerLoopMethod · 0.95
findAndMarkRuntimeMapFunction · 0.80

Calls 7

RebootWaitMethod · 0.95
SetStateMethod · 0.95
VFunction · 0.92
ErrorfFunction · 0.92
InfofMethod · 0.80
LockMethod · 0.80
ErrorfMethod · 0.80

Tested by 1

findAndMarkRuntimeMapFunction · 0.64