Skip to content

Commit

Permalink
Misc fixes
Browse files Browse the repository at this point in the history
Add return after error in debug store handler.

Pass interface rather than interface generator when registering pod and
namespace handlers.
  • Loading branch information
mwhittington21 committed Mar 13, 2017
1 parent cfb7a6b commit c57485c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 2 additions & 10 deletions cmd/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ func (k8s *k8s) watchForPods(podManager kcache.ResourceEventHandler) kcache.Stor
k8s.createPodLW(),
&api.Pod{},
resyncPeriod,
kcache.ResourceEventHandlerFuncs{
AddFunc: podManager.OnAdd,
DeleteFunc: podManager.OnDelete,
UpdateFunc: podManager.OnUpdate,
},
podManager,
)
go podController.Run(wait.NeverStop)
return podStore
Expand All @@ -50,11 +46,7 @@ func (k8s *k8s) watchForNamespaces(nsManager kcache.ResourceEventHandler) kcache
k8s.createNamespaceLW(),
&api.Namespace{},
resyncPeriod,
kcache.ResourceEventHandlerFuncs{
AddFunc: nsManager.OnAdd,
DeleteFunc: nsManager.OnDelete,
UpdateFunc: nsManager.OnUpdate,
},
nsManager,
)
go nsController.Run(wait.NeverStop)
return nsStore
Expand Down
1 change: 1 addition & 0 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func (s *Server) debugStoreHandler(w http.ResponseWriter, r *http.Request) {
if err != nil {
log.Errorf("Error converting debug map to json: %+v", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

w.Write(o)
Expand Down

0 comments on commit c57485c

Please sign in to comment.