"net/http"
)
-type ReadyCB func()
+type ReadyCB func(interface{})
var (
// XApp is an application instance
Rmr *RMRClient
Sdl *SDLClient
+ UeNib *UENIBClient
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()
Config = Configurator{}
Metric = NewMetrics(viper.GetString("metrics.url"), viper.GetString("metrics.namespace"), Resource.router)
Rmr = NewRMRClient()
+ UeNib = NewUENIBClient()
if viper.IsSet("db.namespaces") {
namespaces := viper.GetStringSlice("db.namespaces")
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