orcheEngine.IScoringmgr = scoringmgr.Init()
orcheEngine.IConfiguremgr = configuremgr.Init()
- discoverymgr.InitDiscovery()
- servicemgr.Init()
- securemgr.Init(keyFilePath)
orcheEngine.IScoringmgr.IRunningScore = scoringmgr.LoadScoringGeneralInterface
+ orcheEngine.IScoringmgr.IStartResourceService = scoringmgr.StartResourceService
+ orcheEngine.IScoringmgr.IStopResourceService = scoringmgr.StopResourceService
orcheEngine.IScoringmgr.IGetScore = scoringmgr.GetScore
orcheEngine.IScoringmgr.Ch = make(chan interface{}, 1024)
orcheEngine.IDiscoverymgr.GetEndpointDevices = discoverymgr.GetDeviceListWithService
orcheEngine.IServicemgr.ExecuteApp = servicemgr.ExecuteApp
+ //1.scoringmgr init
orcheEngine.IScoringmgr.Listening()
+ orcheEngine.IScoringmgr.IStartResourceService()
+
+ //2.configuremgr init
go orcheEngine.IConfiguremgr.Watch("/etc/edge-orchestration")
+ //3.securemgr init
+ securemgr.Init(keyFilePath)
+
+ //4.servicemgr init
+ servicemgr.Init()
+
+ //5.discoverymgr init
+ discoverymgr.InitDiscovery()
+ discoverymgr.GetDeviceList()
+
+ //6.httpserver init
router := restapi.NewRouter()
go http.ListenAndServe(fmt.Sprintf(":%d", ConstWellknownPort), router)
- discoverymgr.GetDeviceList()
-
+
errCode = 0
+
+ log.Println(logPrefix, "orchestration init done")
+
+ //NOTE : CMain work init thread and requestservice thread seperatly.
+ //NOTE : Need Ready variable.
+ orcheEngine.Ready = true
return
}