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

Function Run

cmd/controller/app/server.go:39–49  ·  view source on GitHub ↗
(runOptions *options.ControllerOptions)

Source from the content-addressed store, hash-verified

37)
38
39func Run(runOptions *options.ControllerOptions) error {
40 port := runOptions.RecommendedOptions.SecureServing.BindPort
41 addr := fmt.Sprintf(":%d", port)
42
43 app, err := Init(runOptions)
44 if err != nil {
45 return err
46 }
47 handler := wrapRouter(app, runOptions)
48 return fasthttp.ListenAndServe(addr, handler)
49}
50
51func Init(runOptions *options.ControllerOptions) (app *controller.Controller, err error) {
52 app, err = controller.Init(runOptions)

Callers 1

mainFunction · 0.92

Calls 3

ListenAndServeMethod · 0.80
InitFunction · 0.70
wrapRouterFunction · 0.70

Tested by

no test coverage detected