updateMTypes := func() {
var mtypes []mtype
- viper.UnmarshalKey("rmr.mtypes", &mtypes)
+ viper.UnmarshalKey("messaging.mtypes", &mtypes)
if len(mtypes) > 0 {
l.Info("Config mtypes before RICMessageTypes:%d RicMessageTypeToName:%d", len(RICMessageTypes), len(RicMessageTypeToName))
return plist
}
+ if viper.IsSet("messaging") == false {
+ if pname == "http" {
+ d.Port = 8080
+ }
+ if pname == "rmrdata" {
+ d.Port = 4560
+ }
+ return
+ }
+
for _, v := range viper.GetStringMap("messaging")["ports"].([]interface{}) {
if n, ok := v.(map[string]interface{})["name"].(string); ok && n == pname {
d.Name = n
func (*Configurator) GetStringMap(key string) map[string]interface{} {
return viper.GetStringMap(key)
}
+
+func (*Configurator) IsSet(key string) bool {
+ return viper.IsSet(key)
+}