Loading go-apps/meep-app-enablement/server/app-support/api_timing.go +2 −4 Original line number Diff line number Diff line Loading @@ -28,11 +28,9 @@ import ( ) func TimingCapsGET(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") w.WriteHeader(http.StatusOK) timingCapsGET(w, r) } func TimingCurrentTimeGET(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") w.WriteHeader(http.StatusOK) timingCurrentTimeGET(w, r) } go-apps/meep-app-enablement/server/app-support/app-support.go +41 −0 Original line number Diff line number Diff line Loading @@ -672,3 +672,44 @@ func sendAppTermNotification(notifyUrl string, notification AppTerminationNotifi met.ObserveNotification(sandboxName, serviceName, notification.NotificationType, notifyUrl, resp, duration) defer resp.Body.Close() } func timingCapsGET(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") log.Info("timingCapsGET") seconds := time.Now().Unix() var timeStamp TimingCapsTimeStamp timeStamp.Seconds = int32(seconds) var timingCaps TimingCaps timingCaps.TimeStamp = &timeStamp jsonResponse, err := json.Marshal(timingCaps) if err != nil { log.Error(err.Error()) http.Error(w, err.Error(), http.StatusInternalServerError) return } w.WriteHeader(http.StatusOK) fmt.Fprintf(w, string(jsonResponse)) } func timingCurrentTimeGET(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") log.Info("timingCurrentTimeGET") seconds := time.Now().Unix() var currentTime CurrentTime currentTime.Seconds = int32(seconds) currentTime.TimeSourceStatus = "TRACEABLE" jsonResponse, err := json.Marshal(currentTime) if err != nil { log.Error(err.Error()) http.Error(w, err.Error(), http.StatusInternalServerError) return } w.WriteHeader(http.StatusOK) fmt.Fprintf(w, string(jsonResponse)) } go-apps/meep-loc-serv/server/loc-serv.go +9 −5 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ const serviceAppVersion = "2.1.1" var serviceAppInstanceId string var appEnablementClientUrl string = "http://meep-app-enablement" var appEnablementSupport bool = true var appEnablementSupport bool = false var appEnablementSrvMgmtClient *srvMgmtClient.APIClient var appEnablementAppSupportClient *appSupportClient.APIClient var sendAppTerminationWhenDone bool = false Loading Loading @@ -323,12 +323,16 @@ func Stop() (err error) { if err != nil { return err } if appEnablementSupport { retryAppEnablementTicker.Stop() if sendAppTerminationWhenDone { err = appEnablementMecAppTermination(serviceAppInstanceId) if err != nil { return err } } } return nil } Loading go-apps/meep-rnis/server/rnis.go +9 −5 Original line number Diff line number Diff line Loading @@ -393,17 +393,21 @@ func Run() (err error) { // Stop - Stop RNIS func Stop() (err error) { retryAppEnablementTicker.Stop() err = sbi.Stop() if err != nil { return err } if appEnablementSupport { retryAppEnablementTicker.Stop() if sendAppTerminationWhenDone { err = appEnablementMecAppTermination(serviceAppInstanceId) if err != nil { return err } } } return nil } Loading go-apps/meep-wais/server/wais.go +7 −4 Original line number Diff line number Diff line Loading @@ -285,12 +285,15 @@ func Stop() (err error) { if err != nil { return err } if appEnablementSupport { retryAppEnablementTicker.Stop() if sendAppTerminationWhenDone { err = appEnablementMecAppTermination(serviceAppInstanceId) if err != nil { return err } } } return nil } Loading Loading
go-apps/meep-app-enablement/server/app-support/api_timing.go +2 −4 Original line number Diff line number Diff line Loading @@ -28,11 +28,9 @@ import ( ) func TimingCapsGET(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") w.WriteHeader(http.StatusOK) timingCapsGET(w, r) } func TimingCurrentTimeGET(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") w.WriteHeader(http.StatusOK) timingCurrentTimeGET(w, r) }
go-apps/meep-app-enablement/server/app-support/app-support.go +41 −0 Original line number Diff line number Diff line Loading @@ -672,3 +672,44 @@ func sendAppTermNotification(notifyUrl string, notification AppTerminationNotifi met.ObserveNotification(sandboxName, serviceName, notification.NotificationType, notifyUrl, resp, duration) defer resp.Body.Close() } func timingCapsGET(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") log.Info("timingCapsGET") seconds := time.Now().Unix() var timeStamp TimingCapsTimeStamp timeStamp.Seconds = int32(seconds) var timingCaps TimingCaps timingCaps.TimeStamp = &timeStamp jsonResponse, err := json.Marshal(timingCaps) if err != nil { log.Error(err.Error()) http.Error(w, err.Error(), http.StatusInternalServerError) return } w.WriteHeader(http.StatusOK) fmt.Fprintf(w, string(jsonResponse)) } func timingCurrentTimeGET(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=UTF-8") log.Info("timingCurrentTimeGET") seconds := time.Now().Unix() var currentTime CurrentTime currentTime.Seconds = int32(seconds) currentTime.TimeSourceStatus = "TRACEABLE" jsonResponse, err := json.Marshal(currentTime) if err != nil { log.Error(err.Error()) http.Error(w, err.Error(), http.StatusInternalServerError) return } w.WriteHeader(http.StatusOK) fmt.Fprintf(w, string(jsonResponse)) }
go-apps/meep-loc-serv/server/loc-serv.go +9 −5 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ const serviceAppVersion = "2.1.1" var serviceAppInstanceId string var appEnablementClientUrl string = "http://meep-app-enablement" var appEnablementSupport bool = true var appEnablementSupport bool = false var appEnablementSrvMgmtClient *srvMgmtClient.APIClient var appEnablementAppSupportClient *appSupportClient.APIClient var sendAppTerminationWhenDone bool = false Loading Loading @@ -323,12 +323,16 @@ func Stop() (err error) { if err != nil { return err } if appEnablementSupport { retryAppEnablementTicker.Stop() if sendAppTerminationWhenDone { err = appEnablementMecAppTermination(serviceAppInstanceId) if err != nil { return err } } } return nil } Loading
go-apps/meep-rnis/server/rnis.go +9 −5 Original line number Diff line number Diff line Loading @@ -393,17 +393,21 @@ func Run() (err error) { // Stop - Stop RNIS func Stop() (err error) { retryAppEnablementTicker.Stop() err = sbi.Stop() if err != nil { return err } if appEnablementSupport { retryAppEnablementTicker.Stop() if sendAppTerminationWhenDone { err = appEnablementMecAppTermination(serviceAppInstanceId) if err != nil { return err } } } return nil } Loading
go-apps/meep-wais/server/wais.go +7 −4 Original line number Diff line number Diff line Loading @@ -285,12 +285,15 @@ func Stop() (err error) { if err != nil { return err } if appEnablementSupport { retryAppEnablementTicker.Stop() if sendAppTerminationWhenDone { err = appEnablementMecAppTermination(serviceAppInstanceId) if err != nil { return err } } } return nil } Loading