Changes to add the read only cores and some fixes to bugs
for processing the config file.
Change-Id: I1393c05d4cbce215e97d1f17b13e044eda7ae472
diff --git a/afrouter/afrouter/config.go b/afrouter/afrouter/config.go
index 528a3f7..a9a01eb 100644
--- a/afrouter/afrouter/config.go
+++ b/afrouter/afrouter/config.go
@@ -91,7 +91,7 @@
type OverrideConfig struct {
Methods []string `json:"methods"`
- Method []string `json:"method"`
+ Method string `json:"method"`
RouteField string `json:"routing_field"`
}
@@ -113,6 +113,7 @@
Strategy string `json:"strategy"`
Location string `json:"location"`
Field string `json:"field"`
+ Key string `json:"key"`
}
type ConnectionConfig struct {
@@ -183,7 +184,10 @@
return err
}
- json.Unmarshal(configBytes, conf)
+ if err := json.Unmarshal(configBytes, conf); err != nil {
+ log.Errorf("Unmarshaling of the configuratino file failed: %v", err)
+ return err
+ }
// Now resolve references to different config objects in the
// config file. Currently there are 2 possible references