Code Review
/
ric-plt
/
rtmgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add new packages to the container
[ric-plt/rtmgr.git]
/
pkg
/
nbi
/
httpgetter.go
diff --git
a/pkg/nbi/httpgetter.go
b/pkg/nbi/httpgetter.go
index
93ef532
..
bdcc435
100644
(file)
--- a/
pkg/nbi/httpgetter.go
+++ b/
pkg/nbi/httpgetter.go
@@
-35,20
+35,20
@@
import (
)
type HttpGetter struct {
)
type HttpGetter struct {
-
Nbi
Engine
- FetchAllX
apps FetchAllXa
ppsHandler
+ Engine
+ FetchAllX
Apps FetchAllXA
ppsHandler
}
func NewHttpGetter() *HttpGetter {
instance := new(HttpGetter)
}
func NewHttpGetter() *HttpGetter {
instance := new(HttpGetter)
- instance.FetchAllX
apps = fetchAllXa
pps
+ instance.FetchAllX
Apps = fetchAllXA
pps
return instance
}
var myClient = &http.Client{Timeout: 5 * time.Second}
return instance
}
var myClient = &http.Client{Timeout: 5 * time.Second}
-func fetchAllX
a
pps(xmurl string) (*[]rtmgr.XApp, error) {
- rtmgr.Logger.Info("Invoked http
g
etter.fetchXappList: " + xmurl)
+func fetchAllX
A
pps(xmurl string) (*[]rtmgr.XApp, error) {
+ rtmgr.Logger.Info("Invoked http
G
etter.fetchXappList: " + xmurl)
r, err := myClient.Get(xmurl)
if err != nil {
return nil, err
r, err := myClient.Get(xmurl)
if err != nil {
return nil, err
@@
-57,21
+57,21
@@
func fetchAllXapps(xmurl string) (*[]rtmgr.XApp, error) {
if r.StatusCode == 200 {
rtmgr.Logger.Debug("http client raw response: %v", r)
if r.StatusCode == 200 {
rtmgr.Logger.Debug("http client raw response: %v", r)
- var x
a
pps []rtmgr.XApp
- err = json.NewDecoder(r.Body).Decode(&x
a
pps)
+ var x
A
pps []rtmgr.XApp
+ err = json.NewDecoder(r.Body).Decode(&x
A
pps)
if err != nil {
rtmgr.Logger.Warn("Json decode failed: " + err.Error())
}
rtmgr.Logger.Info("HTTP GET: OK")
if err != nil {
rtmgr.Logger.Warn("Json decode failed: " + err.Error())
}
rtmgr.Logger.Info("HTTP GET: OK")
- rtmgr.Logger.Debug("http
getter.fetchXappList returns: %v", xa
pps)
- return &x
a
pps, err
+ rtmgr.Logger.Debug("http
Getter.fetchXappList returns: %v", xA
pps)
+ return &x
A
pps, err
}
}
- rtmgr.Logger.Warn("http
g
etter got an unexpected http status code: %v", r.StatusCode)
+ rtmgr.Logger.Warn("http
G
etter got an unexpected http status code: %v", r.StatusCode)
return nil, nil
}
func (g *HttpGetter) Initialize(xmurl string, nbiif string, fileName string, configfile string,
return nil, nil
}
func (g *HttpGetter) Initialize(xmurl string, nbiif string, fileName string, configfile string,
- sdlEngine sdl.
SdlEngine, rpeEngine rpe.Rpe
Engine, triggerSBI chan<- bool) error {
+ sdlEngine sdl.
Engine, rpeEngine rpe.
Engine, triggerSBI chan<- bool) error {
return nil
}
return nil
}