Skip to content

Instantly share code, notes, and snippets.

@ramr
Created December 9, 2016 03:44
Show Gist options
  • Save ramr/334535bfdf56eea8b6f6b7f66159895e to your computer and use it in GitHub Desktop.
Save ramr/334535bfdf56eea8b6f6b7f66159895e to your computer and use it in GitHub Desktop.
git-diff-changes
$ git diff pkg/router/controller/unique_host.go | cat
diff --git a/pkg/router/controller/unique_host.go b/pkg/router/controller/unique_host.go
index 1e21b46..d990349 100644
--- a/pkg/router/controller/unique_host.go
+++ b/pkg/router/controller/unique_host.go
@@ -205,6 +205,13 @@ func (p *UniqueHost) HandleRoute(eventType watch.EventType, route *routeapi.Rout
}
}
p.routeToHost[routeName] = host
+
+ rrroutes, _ := p.hostToRoute[host]
+ glog.Warningf("ramr: In ADD/MODIFY. Entries for host %s: ", host)
+ for i := range rrroutes {
+ glog.Warningf("ramr: %s : %s", routeNameKey(rrroutes[i]), rrroutes[i].Spec.Path)
+ }
+
return p.plugin.HandleRoute(eventType, route)
case watch.Deleted:
@@ -219,6 +226,7 @@ func (p *UniqueHost) HandleRoute(eventType watch.EventType, route *routeapi.Rout
if old[i].Name != route.Name {
next = append(next, old[i])
}
+
}
if len(next) > 0 {
@@ -229,6 +237,13 @@ func (p *UniqueHost) HandleRoute(eventType watch.EventType, route *routeapi.Rout
}
}
delete(p.routeToHost, routeName)
+
+ rrroutes, _ := p.hostToRoute[host]
+ glog.Warningf("ramr: In DELETE. Entries for host %s: ", host)
+ for i := range rrroutes {
+ glog.Warningf("ramr: %s : %s", routeNameKey(rrroutes[i]), rrroutes[i].Spec.Path)
+ }
+
return p.plugin.HandleRoute(eventType, route)
}
return nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment