Reduce metrics mechanism to just support fastdp
This commit is contained in:
1 parent
0458d32089
commit
4d8a40c0b5
2 files changed
+5
-20
No files matched your search
@@ -42,29 +42,14 @@ func (osw *OverlaySwitch) AddFeaturesTo(features map[string]string) {
|
||||
features["Overlays"] = strings.Join(osw.overlayNames, " ")
|
||||
}
|
||||
|
||||
type OverlaySwitchDiagnostics map[string]interface{}
|
||||
|
||||
func (osw *OverlaySwitch) Diagnostics() interface{} {
|
||||
diagnostics := make(OverlaySwitchDiagnostics)
|
||||
diagnostics := make(map[string]interface{})
|
||||
for name, overlay := range osw.overlays {
|
||||
diagnostics[name] = overlay.Diagnostics()
|
||||
}
|
||||
return diagnostics
|
||||
}
|
||||
|
||||
type MetricsReporter interface {
|
||||
Metrics() interface{}
|
||||
}
|
||||
|
||||
func (d OverlaySwitchDiagnostics) Metrics() interface{} {
|
||||
for _, entry := range d {
|
||||
if fastDPEntry, ok := entry.(MetricsReporter); ok {
|
||||
return fastDPEntry.Metrics()
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (osw *OverlaySwitch) InvalidateRoutes() {
|
||||
for _, overlay := range osw.overlays {
|
||||
overlay.InvalidateRoutes()
|
||||
|
||||
Reference in new issue
Block a user