X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frtmgr%2Frtmgr.go;h=3c4f4e58a8f9277a55106f02c869ae432e9efece;hb=87c46ef443a44730cfdcab1ba00b25f60825e037;hp=de7db0096e0f07cc15dbc4349ee059d4debfd13c;hpb=6a9ce4976c1fbbcb8d4a068f81e76515c99a9d3f;p=ric-plt%2Frtmgr.git diff --git a/pkg/rtmgr/rtmgr.go b/pkg/rtmgr/rtmgr.go index de7db00..3c4f4e5 100644 --- a/pkg/rtmgr/rtmgr.go +++ b/pkg/rtmgr/rtmgr.go @@ -39,11 +39,12 @@ import ( ) var ( - Eps Endpoints - Subs SubscriptionList - PrsCfg *PlatformRoutes - Mtype MessageTypeList + Eps Endpoints + Subs SubscriptionList + PrsCfg *PlatformRoutes + Mtype MessageTypeList DynamicRouteList []string + RMRConnStatus map[string]bool ) func GetPlatformComponents(configfile string) (*PlatformComponents, error) { @@ -64,19 +65,19 @@ func GetPlatformComponents(configfile string) (*PlatformComponents, error) { if err != nil { return nil, errors.New("cannot read the file due to: " + err.Error()) } - err = json.Unmarshal(jsonByteValue,&rtroutes) - if err != nil { - return nil, errors.New("cannot parse data due to: " + err.Error()) - } - PrsCfg = &(rtroutes.Prs) + err = json.Unmarshal(jsonByteValue, &rtroutes) + if err != nil { + return nil, errors.New("cannot parse data due to: " + err.Error()) + } + PrsCfg = &(rtroutes.Prs) - err = json.Unmarshal(jsonByteValue,&mtypes) - if err != nil { - return nil, errors.New("cannot parse data due to: " + err.Error()) - } else { + err = json.Unmarshal(jsonByteValue, &mtypes) + if err != nil { + return nil, errors.New("cannot parse data due to: " + err.Error()) + } else { xapp.Logger.Debug("Messgaetypes = %v", mtypes) - for _,m := range mtypes.Mit { - splitstr := strings.Split(m,"=") + for _, m := range mtypes.Mit { + splitstr := strings.Split(m, "=") Mtype[splitstr[0]] = splitstr[1] } }