X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Frtmgr%2Frtmgr.go;h=3c4f4e58a8f9277a55106f02c869ae432e9efece;hb=4101d1060980858538c5600af8d9ad7a258db107;hp=de7db0096e0f07cc15dbc4349ee059d4debfd13c;hpb=82c726627010dca2467989ec36cac6626ae9943a;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] } }