Add new interfaces
[ric-plt/xapp-frame.git] / pkg / xapp / xapp.go
index 78df93e..1fd7ad6 100755 (executable)
@@ -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