(runOptions *options.ControllerOptions)
| 37 | ) |
| 38 | |
| 39 | func 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 | |
| 51 | func Init(runOptions *options.ControllerOptions) (app *controller.Controller, err error) { |
| 52 | app, err = controller.Init(runOptions) |
no test coverage detected