X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fxapp%2Fxapp.go;h=1fd7ad66f62cdd97136ef853f0f4d1946acf973f;hb=192518d79ebcffe17bf569bf9037321a6fd26d44;hp=78df93e84865ab2c8ac512d58a9f0366a7192c40;hpb=349a098dffbe8db49a067f3c9b37c44d891ce704;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/xapp/xapp.go b/pkg/xapp/xapp.go index 78df93e..1fd7ad6 100755 --- a/pkg/xapp/xapp.go +++ b/pkg/xapp/xapp.go @@ -25,7 +25,7 @@ import ( "net/http" ) -type ReadyCB func() +type ReadyCB func(interface{}) var ( // XApp is an application instance @@ -34,10 +34,18 @@ var ( Rnib *RNIBClient Resource *Router Metric *Metrics - Logger Log + Logger *Log Config Configurator ) +func IsReady() bool { + return Rmr.IsReady() && Sdl.IsReady() +} + +func SetReadyCB(cb ReadyCB, params interface{}) { + Rmr.SetReadyCB(cb, params) +} + func init() { // Load xapp configuration Logger = LoadConfig() @@ -69,11 +77,3 @@ func Run(c MessageConsumer) { Sdl.TestConnection() Rmr.Start(c) } - -func IsReady() bool { - return Rmr.IsReady() && Sdl.IsReady() -} - -func SetReadyCB(cb ReadyCB) { - Rmr.SetReadyCB(cb) -} \ No newline at end of file