From: subhash kumar singh Date: Tue, 1 Jun 2021 13:13:32 +0000 (+0530) Subject: Example to read configuration X-Git-Tag: 1.0.1~9 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F6186%2F1;p=ric-app%2Fhw-go.git Example to read configuration Example to demonstrate reading configuration. Signed-off-by: subhash kumar singh Change-Id: Ife41214be107c76f31d61addc2f91fd1678796e4 --- diff --git a/config/config-file.json b/config/config-file.json index 8caecdb..9ba61e9 100644 --- a/config/config-file.json +++ b/config/config-file.json @@ -106,4 +106,7 @@ ] } ] + "db" : { + "waitForSdl": false + } } diff --git a/hwApp.go b/hwApp.go index 1704dda..90aed67 100755 --- a/hwApp.go +++ b/hwApp.go @@ -51,7 +51,11 @@ func (e *HWApp) Run() { // register callback after xapp ready xapp.SetReadyCB(e.xAppStartCB, true) - xapp.RunWithParams(e, false) + // reading configuration from config file + waitForSdl := xapp.Config.GetBool("db.waitForSdl") + + // start xapp + xapp.RunWithParams(e, waitForSdl) }