Some code refactoring, etc.
Change-Id: I4d3e4a38fcdeab11fa846c3b7ec16d998fe29180
Signed-off-by: Mohamed Abukar <abukar.mohamed@nokia.com>
diff --git a/pkg/xapp/restapi.go b/pkg/xapp/restapi.go
index 46e81f6..e335c08 100755
--- a/pkg/xapp/restapi.go
+++ b/pkg/xapp/restapi.go
@@ -37,6 +37,10 @@
AppConfigURL = "/ric/v1/config"
)
+var (
+ healthReady bool
+)
+
type StatusCb func() bool
type Router struct {
@@ -97,7 +101,12 @@
return
}
+func IsHealthProbeReady() bool {
+ return healthReady
+}
+
func readyHandler(w http.ResponseWriter, r *http.Request) {
+ healthReady = true
respondWithJSON(w, http.StatusOK, nil)
}