Code Review
/
ric-plt
/
xapp-frame.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Allocate a new buffer when retrying
[ric-plt/xapp-frame.git]
/
pkg
/
xapp
/
xapp.go
diff --git
a/pkg/xapp/xapp.go
b/pkg/xapp/xapp.go
index
d796afe
..
69d2964
100755
(executable)
--- a/
pkg/xapp/xapp.go
+++ b/
pkg/xapp/xapp.go
@@
-25,6
+25,8
@@
import (
"net/http"
)
"net/http"
)
+type ReadyCB func(interface{})
+
var (
// XApp is an application instance
Rmr *RMRClient
var (
// XApp is an application instance
Rmr *RMRClient
@@
-33,20
+35,28
@@
var (
Rnib *RNIBClient
Resource *Router
Metric *Metrics
Rnib *RNIBClient
Resource *Router
Metric *Metrics
- Logger Log
+ Logger
*
Log
Config Configurator
)
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()
Logger.SetLevel(viper.GetInt("logger.level"))
func init() {
// Load xapp configuration
Logger = LoadConfig()
Logger.SetLevel(viper.GetInt("logger.level"))
- Rmr = NewRMRClient()
Resource = NewRouter()
Config = Configurator{}
Resource = NewRouter()
Config = Configurator{}
- UeNib = NewUENIBClient()
Metric = NewMetrics(viper.GetString("metrics.url"), viper.GetString("metrics.namespace"), Resource.router)
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")
if viper.IsSet("db.namespaces") {
namespaces := viper.GetStringSlice("db.namespaces")